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