メインコンテンツまでスキップ

1. Registering and Configuring a Cluster

Acquiring DataPlane Cluster Information

The following pre-configuration steps are required to register a desired cluster in the Modernization Platform. By following these steps, you can obtain the necessary configuration and information for registration.

#!/bin/sh
# Connect to the cluster you want to register and execute the following command.
kubectl create ns zcp-system
kubectl create serviceaccount zcp-mcm-backend-service-admin -n zcp-system
kubectl label sa zcp-mcm-backend-service-admin -n zcp-system zcp-mcm-default=true
kubectl create clusterrolebinding zcp-mcm-backend-service-admin \
--clusterrole cluster-admin \
--serviceaccount zcp-system:zcp-mcm-backend-service-admin
kubectl label clusterrolebinding zcp-mcm-backend-service-admin zcp-mcm-default=true
cat << EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: zcp-mcm-backend-service-admin
namespace: zcp-system
annotations:
kubernetes.io/service-account.name: zcp-mcm-backend-service-admin
EOF
CLUSTER_APISERVER=$(kubectl config view --minify | grep server | cut -f 2- -d ":" | tr -d " ")
CLUSTER_TOKEN=$(kubectl get secret -n zcp-system zcp-mcm-backend-service-admin -o jsonpath="{.data['token']}" | base64 -d)
echo "-----------------------------"
echo "CLUSTER_APISERVER :: " $CLUSTER_APISERVER
echo "CLUSTER_TOKEN :: " $CLUSTER_TOKEN
Example Output Screen:

Registering a Cluster

In the Clusters menu of the System Dashboard, you can manage the clusters registered in the system.

Steps to add a cluster in the System Dashboard:

  1. Click the Attach Cluster button in the Clusters list.

  2. Select the provider type where the cluster is installed.

  3. Set the desired Cluster Name.

  4. Enter the Cluster API Server and Token obtained from the previous steps.

  5. Click the Attach button to register the cluster.

After attaching a cluster, you can confirm the registered cluster in the Clusters listing page:

Installing Add-On Components

To install an Add-On component, select the desired cluster and navigate to the Add-ons tab, where you can find the list of supported Add-On components.

Next, install the components required for monitoring.

Fluent-bit

Select a version and click Save to install.

Fluentd

Select the latest version, then a window will open to enter the required parameters. Click Save to proceed with the installation.

Prometheus

Select the latest version and click Save to install.

Prometheus-blackbox-exporter

Enter a Name, select a version, and click Save to install.

prometheus-k8s-events-exporter

Enter a Name, select a version, and click Save to install.