Posts

Showing posts with the label Kubectl Commands For Beginners

Kubectl Commands For Beginners

$ kubectl config get-contexts  : View list of clusters 2.  $  kubectl config current-context  : To view current running version 3.  $  kubectl config use-context <context-name>  : Switch to cluster or context 4.  $ kubectl get ns  : Generate a plain-text list of all namespaces 5.  $ kubectl get po -A  : Generate list of all pods in all namespaces 6.  $ kubectl create namespace [namespace-name] : Create namespace 7.  $kubectl get po : Generate a plain-text list of all pods in default namespace. $ kubectl get po -n <namespace_name> : display pods underspecific name space 8.  $ kubectl get   pods -o wide  : Generate a detailed plain-text list of all pods, containing information such as node name 9.  $ kubectl get svc  : Display all services in default namespace 10.  $ kubectl create –f [manifest-filename]  :Create a resource from a JSON or YAML file 11.  $ kubectl ap...