If you have more than one cluster as illustrated in https://ismael.casimpan.com/quicktasks-k8s/list-nodes-in-kubernetes/, you can change it using command: 1kubectl config use-context <cluster_name_here> Use this command to verify the change: 1kubectl config get-contexts
Read MoreIf you have a lot of kubernetes cluster, you will see the following: 1user@example:~$ kubectl config get-contexts 2CURRENT NAME CLUSTER AUTHINFO NAMESPACE 3* do-nyc1-kubernetes-tutorial do-nyc1-kubernetes-tutorial do-nyc1-kubernetes-tutorial-admin 4do-nyc3-infra do-nyc3-infra do-nyc3-infra-admin 5do-nyc2-devinfra …
Read More1user@example:~$ kubectl get nodes 2NAME STATUS ROLES AGE VERSION 3pool-78osxtl1e3-3f4qg Ready <none> 72m v1.17.5 4pool-78osxtl1e3-3f4qw Ready <none> 71m v1.17.5
Read MoreWhen you see similar error as below: 1user@example:~$ kubectl get nodes 2The connection to the server localhost:8080 was refused - did you specify the right host or port? Check for the "$KUBECONFIG" if set and "kubectl config view" output. Chances are, both are empty like below: 1user@example:~$ …
Read More