Kubectl Commands Not Working After v1.20 Cluster Upgrade

Problem

After upgrading our cluster to v1.20, kubectl command returns connection refused message:

Error log
Copy

Environment

  • Platform9 Managed Kubernetes - v5.2 and Higher
  • Cluster running on v1.20

Cause

This is an expected behavior from Kubernetes version v1.20

Resolution

  • A KUBECONFIG environment variable will have to be explicitly sourced or the kubeconfig file needs to be specified via command line option --kubeconfig on the master nodes for kubectl to work.

Sample commands

Javascript
Copy

​It is also recommended to use the kubeconfig assigned to users instead of using the file at /etc/pf9/kube.d/kubeconfigs/admin.yaml since it has blanket elevated permissions.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard