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

  1. 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.
  2. If your network is protected by a company firewall, allow access to the IBM Cloud and IBM Cloud Kubernetes Service API endpoints and ports.
  3. Verify your cluster is healthy: ibmcloud ks cluster get -c CLUSTER_NAME_OR_ID.

Connecting from the CLI

  1. Download and add the kubeconfig configuration file for your cluster to your existing kubeconfig in ~/.kube/config or the last file in the KUBECONFIG environment variable.
    ibmcloud ks cluster config -c CLUSTER_NAME_OR_ID
    
  2. Verify that kubectl commands run properly and that the Kubernetes context is set to your cluster.
    kubectl config current-context
    
    Example output
    <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.

  1. Install the Headlamp add-on if you haven't already.
  2. Get your cluster's default ingress hostname.
    ibmcloud ks cluster get -c CLUSTER_NAME_OR_ID | grep "Ingress Subdomain"
    
  3. 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:

  1. Start a local proxy.
    kubectl proxy
    
  2. 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.