Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Kubectl Commands Not Working After v1.20 Cluster Upgrade
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
After upgrading our cluster to v1.20, kubectl command returns connection refused message:
Error log
xxxxxxxxxxThe connection to the server localhost:8080 was refused - did you specify the right host or port?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
xxxxxxxxxxkubectl --kubeconfig=/path/to/kubeconfig/file get node OR export KUBECONFIG=/path/to/kubeconfig/file kubectl get nodes 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.
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message