Shivam Katare

KubeSphere: A Distributed Operating System

5 min read

Cover Image for KubeSphere: A Distributed Operating System

Hey Readers! This is SHIVAM :)

Today I am gonna talk to you about "KubeSphere". I will tell you about KubeSphere from the very basics but, there are some prerequisites, and requirements that you have to know about, before moving forward with "KubeSphere".

Prerequisites

  • You should know about Kubernetes/K8s and Dockers.
  • You should have familiar with terms like images, containers, microservices, clusters, pods, etc.

Requirements

  • Kubernetes version: 1.19, 1.20, 1.21
  • CPU should be more than 1 core
  • More than 2 GB of RAM required
  • Check out Official Documentation for more.

What Is KubeSphere

KubeSphere is a distributed operating system for cloud-native application management. It provides a plug-and-play architecture, allowing third-party applications to be seamlessly integrated into its ecosystem. KubeSphere is also a multi-tenant container platform with full-stack automated IT operations and streamlined DevOps workflows. It provides developer-friendly web UI, helping enterprises to build out a more robust and feature-rich platform, which includes the most common functionalities needed for enterprise Kubernetes strategy.

This is the definition of the KubeSphere. Now, let's take a look at why we need KubeSphere?

Why KubeSphere?

Now, if you are familiar with K8s and Dockers you know sometimes how difficult to manage "multiple clusters", "manage CI/CD pipelines", or "manage YAML files", but KubeSphere has features in it to handle these things. So, let's its features.

Features Of KubeSphere

1. Multi-cluster Management and Deployment

KubeSphere help us to manage multiple Clusters, we can add and delete clusters in it. To manage multiple clusters, you need to create a host cluster. The host cluster, essentially, is a KubeSphere cluster with the multi-cluster feature enabled. It provides you with the control plane for unified management of member clusters, also known as member clusters. Member clusters are common KubeSphere clusters without the central control plane. Namely, tenants with necessary permissions (usually cluster administrators) can access the control plane from the host cluster to manage all member clusters, such as viewing and editing resources on member clusters.

kubesphere-federation.png

2. CI/CD Pipeline

KubeSphere provides us with Automation, Visualization, Quality Management, and many more.

  • Visualization: Users can easily interact with a visualized control panel to set conditions and manage CI/CD pipelines.

  • Logs: The entire running process of CI/CD pipelines is recorded.

  • Code Quality Management: Static code analysis is supported to detect bugs, code smells, and security vulnerabilities.

CD-pipeline.png

3. Cluster Upgrade and Scaling

The next-gen installer KubeKey provides an easy way of installation, management, and maintenance. Moreover, it supports rolling upgrades of Kubernetes clusters so that the cluster service is always available while being upgraded. Also, you can add new nodes to a Kubernetes cluster to include more workloads by using KubeKey.

4. DevOps Support

KubeSphere provides a pluggable DevOps component based on popular CI/CD tools such as Jenkins. It features automated workflows and tools including binary-to-image (B2I) and source-to-image (S2I) to package source code or binary artifacts into ready-to-run container images.

dev-ops.png

5. Multi-tenant Management

In KubeSphere, resources (for example, clusters) can be shared between tenants. First, administrators or managers need to set different account roles with different authorizations. After that, members of the platform can be assigned these roles to perform specific actions on varied resources. Meanwhile, as KubeSphere completely isolates tenants, they will not affect each other at all.

kubesphere-architecture.png

6. Multiple Storage and Network solutions

It provides open-source storage solutions such as GlusterFS, and CephRBD. Flannel and Calico are open-source network solutions provided by KubeSphere.

Apart from these features, there are also many features available in the KubeSphere.

Now, after getting to know about KubeSphere and its Features, let's get to know about its architecture, and then, we will see how we can install it on our machine.

Architecture

KubeSphere adopts the separation of front and back ends, and also realizes a cloud-native design, the back ends' service components can communicate with external systems through the REST API. All components are included in the architecture diagram below. KubeSphere can run anywhere from an on-premise data center to any cloud to edge. In addition, it can be deployed on any Kubernetes distribution.

8FxPgBYyB.avif

Installation Of KubeSphere

To start with the installation of "KubeSphere" you should have K8s installed in your system. Check your kubectl version and then follow the below commands.

  • Start Installation
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/kubesphere-installer.yaml

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/cluster-configuration.yaml
  • Inspect Logs of Installation.
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
  • Use kubectl get pod --all-namespaces to see whether all pods are running normally in relevant namespaces of KubeSphere. If you are not good with Command Line Interface, you can use the UI interface to check all pods, through Lens( Install Lens). Now, If all pods are running normally, check the port (30880 by default) of the console through the following command:
kubectl get svc/ks-console -n kubesphere-system
  • Make sure port 30880 is opened in security groups and access the web console through the NodePort (IP:30880) with the default account and password.

login.png

successful!
#####################################################
###              Welcome to KubeSphere!           ###
#####################################################

Console: http://192.168.0.8:30880
Account: admin
Password: P@88w0rd

NOTE: Please modify the default password after login.
#####################################################

For more details about installation, you can check out here

Contribute To KubeSphere

Learning things and practicing them on our own is different, Practicing in public is different. KubeSphere is an Open-Source where we can learn more about "KubeSphere" by contributing to it. If you are just learning and practicing it's not gonna quickly help you, but contributing to Open Source will help you to understand the concepts more clearly and in a more efficient way.

Now, here I am not gonna deep dive into how you can contribute to "Open Source".

  1. Just head over to the KubeSphere GitHub Page

  2. Click on Repositories 👇.

2022-05-22 (4).png

  1. Choose any project in which you want to work. 2022-05-22 (5).png

  2. Read the Contributing guidelines and start working on them.

Conclusion

At last, I want to say that, I recently started working with KubeSphere and it's helping me a lot in many different-different ways. This is my learnings with KubeSphere, hope you got some learnings from it.

Resources / References