Connecting to a cluster using Headlamp
Headlamp is a graphical interface (GUI) for managing Kubernetes clusters in the Managed Containers service. Headlamp is a more modern and flexible alternative to Lens that allows you to view and edit cluster resources in a browser or a local application without manual kubectl commands.
You can install Headlamp in two ways:
-
Directly in the cluster (In-cluster mode). In this mode, Headlamp is installed in the Kubernetes cluster as a single pod. Inside this pod, Headlamp works as a proxy to the Kubernetes API: the browser accesses Headlamp, which accesses the Kubernetes API server. In this mode, you can configure centralized access to the cluster for a group of users without having to install the application on each user's device.
-
Locally on your computer as an application (Desktop mode). In this mode, when you launch Headlamp, a local Headlamp server and a web interface in the form of an application window are also started in the background. This mode offers better performance and is best suited for individual work with the cluster.
For more information, see the official Headlamp documentation.
-
Create a cluster if you have not done so already.
-
Make sure that you can connect to the cluster using
kubectl. -
On the host from which you plan to connect to the cluster, install
kauthproxyif the utility is not installed yet:-
Download the archive of the required version from the releases page:
- for Linux:
kauthproxy_linux_....zip; - for macOS:
kauthproxy_darwin_....zip; - for Windows:
kauthproxy_windows_....zip.
- for Linux:
-
Extract the archive.
-
Place the executable file in a directory that is included in the
PATHenvironment variable, for example:- for Linux and macOS: in
/usr/local/bin; - for Windows: in
C:\.
- for Linux and macOS: in
-
-
On the host from which you plan to connect to the cluster, install the Helm client if you have not done so already.
-
Add the Headlamp repository:
helm repo add headlamp https://kubernetes-sigs.github.io/headlamp/helm repo update -
Create the
headlampnamespace and install Headlamp into it:helm install my-headlamp headlamp/headlamp --namespace headlamp --create-namespace -
Make sure that the pod where Headlamp is installed is running:
kubectl get pods -n headlampThe command output should show the pod status as
Running.
Other ways to install Headlamp in a cluster are described in the official documentation.
- Launch the Headlamp application. The page of the cluster whose configuration file you downloaded earlier will open automatically. If you specified more than one cluster, select the desired one manually.