You will no longer need to spell out the full command over and over again, making your life a lot easier when you want to execute multiple Kubernetes commands in one session. Kubernetes commands can be quite lengthy, so setting up some aliases for running kubectl is very helpful. kubectl config view -minify | grep namespace (This command will ensure that you set the namespace correctly for your current context.).kubectl get po -o wide -n -n -n (This command will identify the pods in each namespace).kubectl get pods -all-namespaces (List all pods with status from all namespaces.).Some of the most common and useful commands with namespace are listed below: ![]() ![]() ![]() Kubectl config set-context $(kubectl config current-context) -namespace=mynamespace
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |