Cluster Access - Kubeconfig
Cluster Access - Kubeconfig
Private Cloud Director provides Kubernetes cluster access via kubeconfig — a YAML file containing cluster connection details and authentication configuration. For more information, refer to the Kubernetes kubeconfig documentation.
The kubeconfig file works with kubectl, Kubernetes client libraries (Go, Python, Java, etc.), and any tool that supports the standard kubeconfig format.
Download Kubeconfig
In order to access your clusters outside of the Private Cloud Director UI, you need a kubeconfig file that is properly configured for authenticating with your cluster.
The kubeconfig file can be obtained by following these steps:
In the Private Cloud Director UI, navigate to the Kubernetes cluster you want to access.
Click the Download Kubeconfig button in the top right of the page.
The kubeconfig file will be downloaded to your system's default Downloads folder.
Using kubeconfig
To connect to the cluster using the kubeconfig, follow these steps:
Download the kubeconfig (see above).
Install
kubectlon your machine.Install kubelogin, the OIDC plugin for
kubectl:# Homebrew (macOS and Linux) brew install kubelogin # Krew (macOS, Linux, Windows and ARM) kubectl krew install oidc-login # Chocolatey (Windows) choco install kubeloginAlternatively, you can install kubelogin manually by downloading the binary from the releases page and placing it in your
PATHas a kubectl plugin:unzip kubelogin_linux_amd64.zip -d /tmp/kubelogin/ mv /tmp/kubelogin/kubelogin /usr/local/bin/kubectl-oidc_login chmod +x /usr/local/bin/kubectl-oidc_loginVerify the plugin is detected:
kubectl plugin list # Expected output: # The following compatible plugins are available: # /usr/local/bin/kubectl-oidc_loginExport the
KUBECONFIGenvironment variable in your terminal:export KUBECONFIG=~/Downloads/<cluster-name>.kubeconfigUse
kubectlto access the resources on the cluster:The first time you log in, you will be redirected to a browser page granting your Private Cloud Director account access to the Kubernetes workloads.
Once authenticated, use
kubectlnormally. For example:kubectl get nodes
Troubleshooting
kubelogin not found — Ensure
kubeloginis installed and available on yourPATH. See the kubelogin installation guide.Browser does not open for OIDC login — Verify that your default browser is configured and that the redirect URI is reachable from your machine.
KUBECONFIGnot set — Ifkubectlcannot find your cluster, make sure theKUBECONFIGenvironment variable points to the correct file path.
Last updated
Was this helpful?
