Kubernetes Common Commands

Source: Internet
Author: User

kubernetes Common Commands1. View class Commandskubectl cluster-info----View cluster informationkubectl-s http://localhost:8080 Get componentstatuses----View individual component informationkubectl Get PODS----List all the current podsKubectl get pods-o wide----View the running node where the pods is locatedKubectl Get pods-o yaml----View details of the pods definitionKubectl get RC----View replication Controller informationKubectl Get Service----View service InformationKubectl Get Nodes----View node informationkubectl get pod--selector name=redis----Find pod by selector namekubectl EXEC pod name env----View environment variables for a running pod2. Operation Class Commandkubectl create-f file name----createdkubectl replace-f file name [--force]----rebuildDelete:kubectl delete-f file namekubectl Delete pod pod namekubectl Delete RC rc namekubectl Delete Service service namekubectl Delete pod--allKubectl run Mybusybox--image=busybox----start a podkubectl Run Mybusybox--image=busybox--replicas=5----start multiple podskubectl Delete deployments mybusybox----Deleting the created podkubectl Get PODS----List all the current podskubectl describe pod [podname]----view pod statuskubectl Run Mynginx--image=nginx--port=80--hostport=8000----Create pod with port mappingskubectl run-i--tty busybox--image=busybox----Create pod with terminal---------------------------------------------------------------

Kubernetes Common Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.