VOOZH about

URL: https://thenewstack.io/deploy-microk8s-and-the-kubernetes-dashboard-for-k8s-development/

⇱ Deploy Microk8s and the Kubernetes Dashboard for K8s Development - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-02-12 09:00:13
Deploy Microk8s and the Kubernetes Dashboard for K8s Development
tutorial,
Containers / Kubernetes / Software Development

Deploy Microk8s and the Kubernetes Dashboard for K8s Development

Microk8s is easy to get up and running, so you won't have to waste precious time deploying multiple servers.
Feb 12th, 2022 9:00am by Jack Wallen
👁 Featued image for: Deploy Microk8s and the Kubernetes Dashboard for K8s Development
Image by skylarvision from Pixabay. 

So you want to start developing for Kubernetes, but you don’t want to have to exert the effort to deploy a full-blown Kubernetes cluster to do so. That’s a pretty common problem. And with Kubernetes retiring the support for Docker, you might find a lot of documentation on deploying a Kubernetes cluster to no longer function. On top of that, you might only have a single machine to work with (so deploying an entire cluster can be a challenge).

What do you do? When you only have a single desktop machine, and you need to get this up fast, you can always turn to Microk8s, which is a Cloud Native Computing Foundation-certified upstream Kubernetes platform that you can run from a workstation. Microk8s is easy to get up and running, so you won’t have to waste precious time deploying multiple servers.

Understand, however, Microk8s isn’t what you’d run your apps and services on for public consumption. This should be considered a development environment first and foremost.

With that said, what we’re going to do is deploy both Microk8s and the Kubernetes Dashboard, so you can enjoy a GUI tool to help you work more efficiently.

I’ll be demonstrating on Ubuntu Desktop 20.04, so you’ll want to have at least that version of Ubuntu Desktop up and running. And because the Kubernetes Dashboard is only accessible from within the cluster (at least not without some serious tweaking), your instance of Ubuntu must have a desktop GUI (so don’t try this on a headless server).

Outstanding. Let’s get to work.

Installing Microk8s

The first thing we’re going to do is install Microk8s. Log into your desktop, open a terminal window, and issue the command:

sudo snap install micro8ks --classic

After the installation completes, you must then add your user to the Microk8s group and change the ownership of a newly-created directory. First, add yourself to the group with the command:

sudo usermod -a -G microk8s $USER

Next, you need to make the system aware that you’ve been added to the new group with the command (to avoid having to reboot your machine):

newgrp microk8s

Finally, change the ownership of the .kube folder with:

sudo chown -f -R $USER ~/.kube

Deploying the Kubernetes Dashboard

We can now install the Kubernetes Dashboard (along with a few other addons) with the command:

microk8s enable dns dashboard storage

After this command runs, you need to discover the IP address assigned to the Dashboard. This is done with the command:

microk8s kubectl get all --all-namespaces

You should see quite a bit of output, which will include a listing for the Dashboard that looks like:

kube-system   service/kubernetes-dashboard        ClusterIP   10.152.183.56    <none>        443/TCP                  21m

This tells us the IP address of the Dashboard and the port. The values assigned to your Dashboard will differ.

You’ll need to wait a few minutes before the dashboard becomes available. If you open a web browser on the same desktop you deployed Microk8s and point it to https://IP:443 (where IP is the IP address assigned to the Dashboard), you’ll need to accept the risk (because the Dashboard uses a self-signed certificate). If the connection times out, wait a few more minutes for the service to become available.

Eventually, you’ll be greeted with the Dashboard login window (Figure 1).

👁 The dashboard log-in window

Figure 1: The Dashboard service is ready to be logged into.

Before you can log into the Dashboard, you must first generate an authentication token. Go back to the terminal window and issue the command:

token=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d " " -f1) microk8s kubectl -n kube-system describe secret $token

You will be presented with a long string of characters. Copy that string and then paste it into the text area of the Dashboard log in the window (making sure to select Token). Click Sign in and, upon successful authentication, you’ll find yourself on the main Kubernetes Dashboard window (Figure 2).

👁 GUI: The Kubernetes dashboard.

Figure 2: The Kubernetes Dashboard is ready for use.

Deploy a Container

Click on the + button in the top left corner of the main window. On the resulting page, click Create from form and then fill out the necessary information as shown in Figure 3).

👁 GUI: Deploy a test container

Figure 3: Deploying a test NGINX container named test.

You should immediately be directed to a page that lists your new deployment (Figure 4).

👁 GUI: Deployment running.

Figure 4: Our newly created deployment is up and running.

Click the name of the entry (in this case, tns) to view the details of the deployment (Figure 5).

👁 GUI: Container info

Figure 5: Here you’ll find plenty of information about the running NGINX container.

Go back to the terminal window and issue the command:

microk8s kubectl get all --all-namespaces

You should see an IP address associated with the tns container. Copy and paste that IP address (along with port 8080) into your browser and the NGINX welcome page should appear.

Congratulations, you’ve just deployed Microk8s and the Kubernetes Dashboard to serve as an efficient and simple Kubernetes development platform.

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
The Cloud Native Computing Foundation is a sponsor of The New Stack.
TNS owner Insight Partners is an investor in: Docker.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.