Enable Pluggable Components

This tutorial demonstrates how to enable pluggable components of KubeSphere both before and after the installation. KubeSphere features ten pluggable components which are listed below.

Configuration ItemCorresponding ComponentDescription
alertingKubeSphere alerting systemEnable users to customize alerting policies to send messages to receivers in time with different time intervals and alerting levels to choose from.
auditingKubeSphere audit log systemProvide a security-relevant chronological set of records, recording the sequence of activities that happen in the platform, initiated by different tenants.
devopsKubeSphere DevOps systemProvide an out-of-box CI/CD system based on Jenkins, and automated workflow tools including Source-to-Image and Binary-to-Image.
eventsKubeSphere events systemProvide a graphical web console for the exporting, filtering and alerting of Kubernetes events in multi-tenant Kubernetes clusters.
loggingKubeSphere logging systemProvide flexible logging functions for log query, collection and management in a unified console. Additional log collectors can be added, such as Elasticsearch, Kafka and Fluentd.
metrics_serverHPAThe Horizontal Pod Autoscaler automatically scales the number of pods based on needs.
networkpolicyNetwork policyAllow network isolation within the same cluster, which means firewalls can be set up between certain instances (Pods).
notificationKubeSphere notification systemAllow users to set AlertManager as its sender. Receivers include Email, WeChat Work, and Slack.
openpitrixKubeSphere App StoreProvide an app store for Helm-based applications and allow users to manage apps throughout the entire lifecycle.
servicemeshKubeSphere Service Mesh (Istio-based)Provide fine-grained traffic management, observability and tracing, and visualized traffic topology.

For more information about each component, see Overview of Enable Pluggable Components.

Note

  • If you use KubeKey to install KubeSphere on Linux, by default, the above components are not enabled except metrics_server. However, metrics_server remains disabled in the installer if you install KubeSphere on existing Kubernetes clusters. This is because the component may already be installed in your environment, especially for cloud-hosted Kubernetes clusters.
  • multicluster is not covered in this tutorial. If you want to enable this feature, you need to set a corresponding value for clusterRole. For more information, see Multi-cluster Management.
  • Make sure your machine meets the hardware requirements before the installation. Here is the recommendation if you want to enable all pluggable components: CPU ≥ 8 Cores, Memory ≥ 16 G, Disk Space ≥ 100 G.

Enable Pluggable Components before Installation

Installing on Linux

When you install KubeSphere on Linux, you need to create a configuration file, which lists all KubeSphere components.

  1. In the tutorial of Installing KubeSphere on Linux, you create a default file config-sample.yaml. Modify the file by executing the following command:
  1. vi config-sample.yaml

Note

If you adopt All-in-one Installation, you do not need to create a config-sample.yaml file as you can create a cluster directly. Generally, the all-in-one mode is for users who are new to KubeSphere and look to get familiar with the system. If you want to enable pluggable components in this mode (e.g. for testing purpose), refer to the following section to see how pluggable components can be installed after installation.

  1. In this file, enable the pluggable components you want to install by changing false to true for enabled. Here is an example file for your reference. Save the file after you finish.
  2. Create a cluster using the configuration file:
  1. ./kk create cluster -f config-sample.yaml

Installing on Kubernetes

When you install KubeSphere on Kubernetes, you need to download the file cluster-configuration.yaml for cluster setting. If you want to install pluggable components, do not use kubectl apply -f directly for this file.

  1. In the tutorial of Installing KubeSphere on Kubernetes, you execute kubectl apply -f first for the file kubesphere-installer.yaml. After that, to enable pluggable components, create a local file cluster-configuration.yaml.
  1. vi cluster-configuration.yaml
  1. Copy all the content in the file cluster-configuration.yaml and paste it to the local file just created.
  2. In this local cluster-configuration.yaml file, enable the pluggable components you want to install by changing false to true for enabled. Here is an example file for your reference. Save the file after you finish.
  3. Execute the following command to start installation:
  1. kubectl apply -f cluster-configuration.yaml

Whether you install KubeSphere on Linux or on Kubernetes, you can check the status of the components you have enabled in the web console of KubeSphere after installation. Go to Components, and you can see an image below:

KubeSphere-components

Enable Pluggable Components after Installation

KubeSphere web console provides a convenient way for users to view and operate on different resources. To enable pluggable components after installation, you only need to make few adjustments in the console directly. For those who are accustomed to the Kubernetes command-line tool, kubectl, they will have no difficulty in using KubeSphere as the tool is integrated into the console.

  1. Log in the console as admin. Click Platform in the top-left corner and select Clusters Management.

clusters-management

  1. Click CRDs and enter clusterconfiguration in the search bar. Click the result to view its detailed page.

crds

Info

A Custom Resource Definition (CRD) allows users to create a new type of resources without adding another API server. They can use these resources like any other native Kubernetes objects.

  1. In Resource List, click the three dots on the right of ks-installer and select Edit YAML.

edit-ks-installer

  1. In this yaml file, enable the pluggable components you want to install by changing false to true for enabled. After you finish, click Update to save the configuration.

enable-components

  1. You can use the web kubectl to check the installation process by executing the following command:
  1. kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f

Tip

You can find the web kubectl tool by clicking the hammer icon in the bottom-right corner of the console.

  1. The output will display a message as below if the component is successfully installed.
  1. #####################################################
  2. ### Welcome to KubeSphere! ###
  3. #####################################################
  4. Console: http://192.168.0.2:30880
  5. Account: admin
  6. Password: [email protected]
  7. NOTES
  8. 1. After logging into the console, please check the
  9. monitoring status of service components in
  10. the "Cluster Management". If any service is not
  11. ready, please wait patiently until all components
  12. are ready.
  13. 2. Please modify the default password after login.
  14. #####################################################
  15. https://kubesphere.io 20xx-xx-xx xx:xx:xx
  16. #####################################################
  1. In Components, you can see the status of different components.

components

Tip

If you do not see relevant components in the above image, some pods may not be ready yet. You can execute kubectl get pod --all-namespaces through kubectl to see the status of pods.