TNS
VOXPOP
Favorite Social Media Timesink
When you take a break from work, where are you going?
Instagram/Facebook
0%
Discord/Slack
0%
LinkedIn
0%
Video clips on TikTok/YouTube
0%
X, Bluesky, Mastodon et al...
0%
Web surfing
0%
I do not get distracted by petty amusements
0%
Kubernetes

Deploy KubeSphere for Easy Kubernetes Cluster Management

KubeSphere offers a user-friendly web-based UI for managing your Kubernetes cluster, and even offers CI/CD tools like Jenkins and provides automated building of container images from source code.
Apr 2nd, 2023 6:00am by
Featued image for: Deploy KubeSphere for Easy Kubernetes Cluster Management

If you’re looking for a Kubernetes platform that is tailored for hybrid multicloud, KubeSphere might be just the tool you need.

KubeSphere can help with full-stack, automated IT operations and even streamline your DevOps workflows with a developer-friendly web UI. KubeSphere offers a plug-and-play platform and allows seamless integration of third-party applications.

Most importantly, KubeSphere offers a user-friendly web-based UI for managing your Kubernetes cluster, and even offers CI/CD tools like Jenkins and provides automated building of container images from source code.

KubeSphere is powerful but not exactly easy to deploy. Let me see if I can help you out with that process.

What You’ll Need

I’m going to demonstrate with Ubuntu Server 22.04. You’ll need three instances, one for the master and two for nodes. You’ll also need a user (on each machine) with sudo privileges.

That’s it. Let’s get to work…

Configure Your Servers

With your three servers up and running, there are some configuration steps you need to take on each. The first is to set the hostnames. We’ll call them:

  • kubesphere1
  • kubesphere2
  • kubesphere3

For the purpose of this article, the IP addresses associated with each will be:

  • kubesphere1 – 192.168.1.40
  • kubesphere2 – 192.168.1.41
  • kubesphere3 – 192.168.1.41

Make sure to change the IP address to meet your needs.

Log into your first server and set the hostname with:


Log into the next server and set the hostname with:


Finally, log into the third server and set the hostname with:


Next, we need to configure the hosts file. On all three machines, open the file for editing with the command:


At the bottom of those files, paste the following (adjusting for your IP address scheme):


Save and close the file.

Now, we need to create a new user on each machine. We’ll call that user ubuntu. Remember, this has to be done on all three machines. The command for this is:


Next, create a password for the user with:


Make sure to give the user a strong/unique password.

We now have to allow the new user (on all three machines) to execute sudo commands without a password. To do that, issue the following command on each server:

SSH Key Authentication

We’ll now set up SSH authentication. On the master node (kubesphere1) change to the new ubuntu user with the command:


Create the new key with the command:


It’s important to make sure to not set a password for this key. So, when prompted for a password, just hit Enter on your keyboard.

Once the key is generated, you must copy it to all three servers with the commands:


You will be prompted for the ubuntu user password each time.

Install the Necessary Dependencies

We now must install the necessary dependencies on all three servers. On all three servers, issue the command:

Download the KubeKey Binary

This is done only on the master server. Download the KubeKey binary file with the command:


Give that file executable permission with:

Generate the Required Configuration

Next, we must generate a configuration file on the master server with the command:


Once the configuration file is generated, open it for editing with the command:


You must edit this file so that the hosts section looks like this:


Make sure to edit the IP addresses to conform to your scheme.

Save and close the file.

Deploy Everything

We now need to deploy both Kubernetes and KubeSphere, which is done with a single command:


This will take anywhere from 10-30 minutes to complete (depending on the speed of your network connection and servers). During the initial run, you’ll be prompted to OK the installation, so type yes and hit Enter on your keyboard.

At the end of this lengthy process, you’ll be presented with the address to access KubeSphere, along with the default admin credentials. You can then open a web browser to the indicated address and log in with the supplied credentials (Figure 1).

Figure 1: The KubeSphere login window.

You’ll be prompted to immediately change the admin password. Once you do that, you’ll find yourself on the KubeSphere dashboard, where you can start working with your cluster (Figure 2).

Figure 2: The KubeSphere management platform is ready to go.

Click Platform in the upper left corner and then click Cluster Management, to reveal the management dashboard (Figure 3).

Figure 3: The KubeSphere cluster management dashboard.

Congratulations, you now have a very powerful Kubernetes management platform that can help you take control of your cluster and deployments.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Pragma, Tigera.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.