• Home
  • >
  • Software Development
  • >
  • Deploy Microk8s and the Kubernetes Dashboard for K8s Development – InApps Technology 2022

Deploy Microk8s and the Kubernetes Dashboard for K8s Development – InApps Technology is an article under the topic Software Development Many of you are most interested in today !! Today, let’s InApps.net learn Deploy Microk8s and the Kubernetes Dashboard for K8s Development – InApps Technology in today’s post !

Read more about Deploy Microk8s and the Kubernetes Dashboard for K8s Development – InApps Technology at Wikipedia

You can find content about Deploy Microk8s and the Kubernetes Dashboard for K8s Development – InApps Technology from the Wikipedia website

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.

Read More:   Pancake Breakfast at Cloud Foundry Summit 2016 – InApps Technology 2022

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:

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

Read More:   Aging Linux Kernel Developers Seek Fresh Talent – InApps 2022

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.

Read More:   The Best Public and Private Keygen Algorithm — and Why – InApps 2022

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

List of Keywords users find our article on Google:

microk8s vs k8s
k8s
microk8s
k8s development
kubernetes dashboard
k8s-at-home
snap deploy
k8s dashboard
nginx dashboard
kubernetes
kubernetes gui
first certificate wikipedia
dashboard wikipedia
deploy kubernetes dashboard
technology dashboard
kubectl snap
kubernetes service ownership
the tns group
k8s instance
docker dashboard
kubectl get kubernetes version
kubernetes on desktop
kubernetes dashboard 2.0
kubernetes deploy nginx
k8s health
windowmaking

Source: InApps.net

Rate this post
As a Senior Tech Enthusiast, I bring a decade of experience to the realm of tech writing, blending deep industry knowledge with a passion for storytelling. With expertise in software development to emerging tech trends like AI and IoT—my articles not only inform but also inspire. My journey in tech writing has been marked by a commitment to accuracy, clarity, and engaging storytelling, making me a trusted voice in the tech community.

Let’s create the next big thing together!

Coming together is a beginning. Keeping together is progress. Working together is success.

Let’s talk

Get a custom Proposal

Please fill in your information and your need to get a suitable solution.

    You need to enter your email to download

      Success. Downloading...