Headlamp is an intuitive, web-based Kubernetes dashboard designed to simplify the management of your Kubernetes clusters. With this 1-Click application, you can seamlessly deploy Headlamp on your DigitalOcean Kubernetes cluster, providing you with an easy-to-navigate interface to monitor and manage your cluster’s resources, workloads, and configurations. Headlamp offers real-time insights, resource visualization, and streamlined operations, making it an essential tool for both beginners and experienced Kubernetes users. By installing Headlamp through our 1-Click application, you can save time on setup and focus on optimizing your cluster’s performance and reliability.
Package | Version | License |
---|---|---|
Headlamp | 0.20.0 | Apache License 2.0 |
Click the Deploy to DigitalOcean button to install a Kubernetes 1-Click Application. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.
In addition to creating Headlamp using the control panel, you can also use the DigitalOcean API. As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following doctl
command. You need to authenticate with doctl
with your API access token) and replace the $CLUSTER_NAME
variable with the chosen name for your cluster in the command below.
doctl kubernetes clusters create --size s-4vcpu-8gb $CLUSTER_NAME --1-clicks headlamp
Install doctl (DigitalOcean CLI):
Authenticate doctl:
doctl auth init
and follow the prompts to authenticate with your DigitalOcean account.Create a Kubernetes context:
Retrieve your Kubernetes cluster ID using:sh doctl kubernetes cluster list
Create a context for your cluster:sh doctl kubernetes cluster kubeconfig save <cluster-id>
sh export POD_NAME=$(kubectl get pods --namespace headlamp -l "app.kubernetes.io/name=headlamp,app.kubernetes.io/instance=headlamp" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace headlamp $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace headlamp port-forward $POD_NAME 8080:$CONTAINER_PORT
* Open your web browser and navigate to `http://127.0.0.1:8080` to access the Headlamp dashboard.
Create a service account and cluster role binding:
headlamp-service-account.yaml
with the following content:apiVersion: v1
kind: ServiceAccount
metadata:
name: headlamp-admin
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: headlamp-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: headlamp-admin
namespace: kube-system
* Apply the configuration using:
kubectl apply -f headlamp-service-account.yaml
Generate a token for the service account:
sh kubectl create token headlamp --namespace headlamp
http://127.0.0.1:8080
.Include the following screenshots:
2. Cluster Chooser:
3. Cluster Overview:
4. Logs View:
5. Quick Run:
6. Terminal Access:
7. Resource Edition:
By following these steps, you can effectively manage and monitor your Kubernetes cluster using Headlamp on DigitalOcean. Enjoy streamlined operations and enhanced cluster visibility with this robust 1-Click application.