K3D: Monitoring Your Service using Kubernetes Dashboard or Octant
K3D is a lightweight wrapper around k3s that allows you to run Kubernetes clusters inside Docker containers. While K3D is widely used for local development and testing, effective monitoring of services running on Kubernetes clusters is essential for debugging, performance tuning, and understanding resource usage.
In this blog, I will explore two popular monitoring tools for Kubernetes: Kubernetes Dashboard, the official web-based UI for Kubernetes, and Octant, a local, real-time, standalone dashboard developed by VMware. Both tools have unique strengths, and this guide will help you understand when to use one over the other.
Setting Up Kubernetes Dashboard On K3D
First you need to create a cluster using k3d cluster create
:
Next, deploy Kubernetes Dashboard:
Ensure the pods are running.
Then, create a service account and bind role, to access the dashboard, you need a service account with the proper permissions. Create a service account and cluster role binding using the following YAML:
Apply this configuration:
Then, Retrieve the token for login using:
Use kubectl proxy
to access the dashboard:
Finally, open your browser and navigate to:
Note: Don’t forget to copy and paste the token when prompted.
Setting Up Octant on K3D
First, you need to install Octant, You can install Octant using a package manager or download it directly from the official releases. For example, on macOS, you can use Homebrew:
Next, on Linux just download the appropriate binary and move it to your path:
Then, to start Octant,simply run the binary:
Finally, you can see the dashboard:
Comparison: Kubernetes Dashboard vs Octant
Feature | Kubernetes Dashboard | Octant |
---|---|---|
Installation | Requires deployment on the cluster | Local installation |
Access | Via web proxy | Localhost |
Real-Time Updates | Partial (requires manual refresh) | Full real-time updates |
Ease of Setup | Moderate (requires token and RBAC) | Easy (just run the binary) |
Conclusion
Both Kubernetes Dashboard and Octant offer valuable features for monitoring Kubernetes clusters in K3D. If you need a quick and easy way to monitor your local cluster with minimal setup, Octant is a great choice. On the other hand, if you want an experience closer to managing a production environment, Kubernetes Dashboard is the better option.
References:
Deploy and Access the Kubernetes Dashboard. https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard.
K3D Install Dashboard. https://gist.github.com/smijar/64e76808c8a349eb64f56c71dc03d8d8.
Setting Up Kubernetes Dashboard on K3D Cluster. https://medium.com/@mamoonaaslam/setting-up-kubernetes-dashboard-on-k3d-cluster-7bd2e261e42a.