Installation of Kubernetes and KubeSphere on Linux

img placeholder

KubeSphere Container Platform:

KubeSphere is a distributed operating system for cloud-native application management, using Kubernetes as its kernel.

Open Source: A CNCF-certified Kubernetes platform, 100% open source, built and improved by the community.

Easy to Run: Can be deployed on an existing Kubernetes cluster or Linux machines, supports online and air-gapped installation.

Rich Features: Deliver DevOps, service mesh, observability, application management, multi-tenancy, storage and networking management in a unified platform.

Modular and Pluggable: The functionalities are modularized and loosely coupled with the platform. Choose the modules according to your business needs.


All-in-One Installation:
  1. Prepare Linux Machine

For Lab purpose i have created a VM with the following specs

kubesphere VM
  • 8vCPU
  • 16GB RAM
  • 100GB free disk space
  • Ubuntu 2204 with static IP

  1. Create the Virtual Machines manually or using Packer template and clone using Terraform/OpenTofu. I have used the OpenTofu code, which will create VM with the required configuration

    img placeholder
    Tofu/terrform code to create kubesphere VM from template

  2. Login to kubesphere VM and run the following commands.

1sudo apt-get update
2sudo apt-get install socat conntrack ebtables ipset -y
  1. Download KubeKey from its GitHub Release Page or run the following command:
1curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.13 sh -
  1. Make kk executable
1chmod +x kk
  1. Create a Kubernetes cluster with KubeSphere installed, run the following command:
1sudo ./kk create cluster --with-kubernetes v1.22.12 --with-kubesphere v3.4.1

After running the command, will see a table for environment check. Type yes to continue.

The output displays the IP address and port number of the web console, which is exposed through NodePort 30880 by default.

In my case, i will be accessing using http://kubesphere.cloudbricks.local:30880 with the default account and password (admin/P@88w0rd).


Enable DevOps and App store:
  1. Login to the Kubesphere URL and go to Cluster config

    img placeholder
    kubesphere Login page

  2. Go to CRDs, in the search "clusterconfig", then click on clusterConfiguration

    img placeholder
    Cluster Config

  3. Under ks-installer click on edit YAML

    img placeholder
    edit Cluster config

  4. scroll through and change devops enabled to True

    img placeholder
    enabling devops

  5. scroll through and change openpitrix enabled to True

    img placeholder
    enabling Appstore

Wait for the changes to reflect, and relogin to the console to check App store

Watch the video on How to setup K3S kubernetes cluster


Posts in this Series