Accessing clusters through the public cloud service endpoint
For IBM Cloud Kubernetes Service Classic and VPC clusters that have a public cloud service endpoint enabled, you can log in from the CLI or a graphical dashboard.
Before you begin
- Install the required CLI tools, including the IBM Cloud CLI, Kubernetes Service plug-in (
ibmcloud ks), and Kubernetes CLI (kubectl). For quick access to test features in your cluster, you can also use the IBM Cloud Shell. - If your network is protected by a company firewall, allow access to the IBM Cloud and IBM Cloud Kubernetes Service API endpoints and ports.
- Verify your cluster is healthy:
ibmcloud ks cluster get -c CLUSTER_NAME_OR_ID.
Connecting from the CLI
- Download and add the
kubeconfigconfiguration file for your cluster to your existingkubeconfigin~/.kube/configor the last file in theKUBECONFIGenvironment variable.ibmcloud ks cluster config -c CLUSTER_NAME_OR_ID - Verify that
kubectlcommands run properly and that the Kubernetes context is set to your cluster.
Example outputkubectl config current-context<cluster_name>/<cluster_ID>
Connecting to the Headlamp dashboard
Headlamp is the recommended graphical dashboard for managing and monitoring your cluster resources. It uses IBM Cloud IAM authentication and is automatically exposed through your cluster's default ingress hostname after you install the add-on.
- Install the Headlamp add-on if you haven't already.
- Get your cluster's default ingress hostname.
ibmcloud ks cluster get -c CLUSTER_NAME_OR_ID | grep "Ingress Subdomain" - Open
https://headlamp.<ingress_subdomain>in a browser and click Sign In.
Legacy: Connecting with kubectl proxy
The upstream kubernetes-dashboard project is archived and no longer installed on new clusters as of version 1.36. Use Headlamp instead.
If your cluster still has the legacy Kubernetes dashboard installed:
- Start a local proxy.
kubectl proxy - Open the following URL in a web browser.
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
Connecting with an API key
See Accessing clusters from automation tools by using an API key.