Register the Worker Cluster
Introduction
Before creating a slice across your Kubernetes clusters, you must register your worker clusters with the KubeSlice Controller. This topic describes the steps to register your worker cluster with the KubeSlice Controller.
Prerequisites
Before you begin, ensure the following prerequisites are met:
- You have the KubeSlice Controller installed on a separate cluster. For more information, see Installing the KubeSlice Controller.
- You have set up the environment for the worker clusters. For more information, see Prerequisites.
- You have authenticated the worker clusters with the cloud providers. For more information, see Preparing the clusters for registration.
- You have cluster administrator privileges to install the Slice Operator.
Install Prometheus
KubeSlice uses Prometheus to collect event and metrics. To view metrics on the dashboard, you can provide the Prometheus URL in the cluster registration YAML file, if Prometheus is already installed on it. The Prometheus URL can also be updated after cluster registration by editing a cluster.
info
To install Prometheus and get the Prometheus URL, follow the instructions in the Install Prometheus section.
Create the Cluster Registration YAML File
The following information is required to create your cluster registration .yaml file.
info
You can list multiple clusters in a single registration YAML file and register them with the KubeSlice Controller.
Create the cluster registration YAML file using the following template.
info
To understand more about the configuration parameters, see Cluster Registration Configuration Parameters.
apiVersion: controller.kubeslice.io/v1alpha1
kind: Cluster
metadata:
name: <cluster-name-1>
namespace: kubeslice-<projectname>
spec:
networkInterface: <network_interface>
clusterProperty:
telemetry:
enabled: true
telemetryProvider: "prometheus"
endpoint: "<prometheus_endpoint>" ## For example: "http://extrenal IP:32700"
geoLocation:
cloudProvider: "<cloud_provider>"
cloudRegion: "<cloud_region>"
---
apiVersion: controller.kubeslice.io/v1alpha1
kind: Cluster
metadata:
name: <cluster-name-2>
namespace: <kubeslice-projectname>
spec:
networkInterface: <network_interface>
clusterProperty:
telemetry:
enabled: true
telemetryProvider: "prometheus"
endpoint: "<prometheus_endpoint>" ## For example: "http://extrenal IP:32700"
geoLocation:
cloudProvider: "<cloud_provider>"
cloudRegion: "<cloud_region>"
Example YAML file
apiVersion: controller.kubeslice.io/v1alpha1
kind: Cluster
metadata:
name: worker-cluster-1
namespace: avesha
spec:
networkInterface: eth0
clusterProperty:
telemetry:
enabled: true
telemetryProvider: "prometheus"
endpoint: "<prometheus_endpoint>" ## For example: "http://extrenal IP:32700"
geoLocation:
cloudProvider: "AZURE"
cloudRegion: "eastus"
---
apiVersion: controller.kubeslice.io/v1alpha1
kind: Cluster
metadata:
name: worker-cluster-2
namespace: avesha
spec:
networkInterface: eth0
clusterProperty:
telemetry:
enabled: true
telemetryProvider: "prometheus"
endpoint: "<prometheus_endpoint>" ## For example: "http://extrenal IP:32700"
geoLocation:
cloudProvider: "GOOGLE"
cloudRegion: "westus2"
Example YAML File Only with Mandatory Parameters
apiVersion: controller.kubeslice.io/v1alpha1
kind: Cluster
metadata:
name: worker-1
namespace: kubeslice-avesha
spec:
networkInterface: eth0
---
apiVersion: controller.kubeslice.io/v1alpha1
kind: Cluster
metadata:
name: worker-2
namespace: kubeslice-avesha
spec:
networkInterface: eth0
Apply the Cluster Registration YAML File
The following information is required.
Values | Description |
---|---|
<cluster name> | The name of the cluster. |
<cluster registration> | The name of the registration YAML file. |
<project namespace> | The namespace of your project. |
info
Register the worker clusters with the KubeSlice Controller by applying the YAML file on the project namespace.
info
You must switch the context to the controller cluster to register the worker cluster.
To apply the cluster registration YAML file:
Switch the context to the controller cluster.
kubectx <controller cluster name>
Use the following command to apply the
.yaml
file.kubectl apply -f <cluster registration>.yaml -n <project namespace>
success
You have successfully registered the worker clusters with the KubeSlice Controller.
Verify the Registered Clusters
Verify the registered clusters by using the following command:
kubectl get clusters -n kubeslice-<project name>
Example
kubectl get clusters -n kubeslice-avesha
Expected Output
NAME AGE
aks-worker-2 17s
gke-worker-1 17s
Install the Slice Operator
After registering the worker cluster with the KubeSlice Controller, you must install the Slice Operator
on your worker cluster. To install the Slice Operator, get the secrets for the worker cluster from the
KubeSlice Controller manually. Use these secrets in your values .yaml
file to install the Slice Operator.
info
Alternatively, you can use the script to create your values .yaml
file.
See Script to get the secrets of the Worker cluster.
Get the Secrets of a Cluster
After registering the worker cluster with the KubeSlice Controller, you get a secret listed under the project namespace. The secret contains access information for the Slice Operator on the worker cluster to communicate with the KubeSlice Controller.
Switch the context to the controller cluster.
kubectx <cluster name>
Get the list of secrets that belong to the project namespace using the following command:
kubectl get secrets -n kubeslice-<projectname>
Example
kubectl get secrets -n kubeslice-avesha
Example Output
NAME TYPE DATA AGE
default-token-q2gp9 kubernetes.io/service-account-token 3 43s
kubeslice-rbac-ro-abc-token-kp9tq kubernetes.io/service-account-token 3 43s
kubeslice-rbac-ro-xyz-token-vcph6 kubernetes.io/service-account-token 3 43s
kubeslice-rbac-rw-abc-token-vkhfb kubernetes.io/service-account-token 3 43s
kubeslice-rbac-rw-xyz-token-rwqr9 kubernetes.io/service-account-token 3 43s
kubeslice-rbac-worker-aks-worker-1-token-hml58 kubernetes.io/service-account-token 5 43s
kubeslice-rbac-worker-aks-worker-2-token-lwzj2 kubernetes.io/service-account-token 5 43sThe name of the secret is in this format:
kubeslice-rbac-<registered cluster secret name>-token
. For example,kubeslice-rbac-worker-aks-worker-1-token-hml58
- this secret is meant for a worker cluster that was registered using the name aks-worker-1.Retrieve the details of the secret using the following command:
kubectl get secrets <worker-cluster-secret-name> -o yaml -n kubeslice-<projectname>
Example Output
kubectl get secrets kubeslice-rbac-worker-aks-worker-1-token-hml58 -o yaml -n kubeslice-cisco
apiVersion: v1
data:
ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUU2VENDQXRHZ0F3SUJBZ0lSQUtkdGsrOTJWQlJaSlJ4K2w5SHFabWN3RFFZSktvWklodmNOQVFFTEJRQXcKRFRFTE1Ba0dBMVVFQXhNQ1kyRXdJQmNOTWpJd016RTFNRGN3TURNM1doZ1BNakExTWpBek1UVXdOekV3TXpkYQpNQTB4Q3pBSkJnTlZCQU1UQW1OaE1JSUNJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBZzhBTUlJQ0NnS0NBZ0VBCm1PZVNWQ3VVY0NNYlJtYkxsREFGSjljZk1ER0hHbWlVcy9PaU1zRm1QelZzcGkveEM0bFhqdStnSGtvNXMwcEEKeWZ6aURMU3c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6aUVrNnNlT3dVYkZ3ZGRuSElGUDN3Yi1qMDdTLUZpVG1ES042UmM3ZUFpNGNUZWtyXzNHZ0NOZllrbHdkdEd5czZETjg0ZlFQbVBqMmpUOS16QnRpcHJyS25SSzVPRHppWG4wT0FPQ0M3QlhpamJQeGswcHpNUG1jdDBBUzg0SGxFckd1WlVRUVNNQ2E5SEFwOG12UExYb3FaN1gxREI1bXBsTkxEM3gzaDgwcURZSExJUXZwNGhEUl8wdkpPSFZMaEl5akQ1NTNVUU5FMExhNThXTnhaTUhEZ1haRUtna3dlYXJBVWFXQ3U4VDRUNWdxS2dNMmFJMDU4RjhNWEVremdfWThCcjhJUnIzbmlJaEhnUXp2bHZFdG5ETl93ajNVXzZwUzJmRFZ4eFpDbURXSmlfUW9fWUpoN2JuVlh1bktDaVdqVWFZanQ1SjN4ZDhXcjkydVJBSDY3MzY4dmxjdWpVOTgyU2FjRTJBaks4NkhCR1FITTlfQ2FpZS1RUUgzc2hhUEVXVE5BT3FZWWMtbldUd29GcjJ0bUhFQnJsc0FVejVxaHdwcDVnMEV5dzFuMUdfS05MVWVwSUpCdF9VWjZpQ0NwX3NVbGZqSFdqb0R1OHJmd1ZIX3FudkZVNUViV0lpdnF4WkFVNTNqQmwtQkJELUlTbTJTMEoxWDJn
kind: Secret
metadata:
annotations:
kubernetes.io/service-account.name: kubeslice-rbac-worker-aks-worker-1
kubernetes.io/service-account.uid: 0c0fb6a2-6e7f-4445-964e-403ff89873eb
creationTimestamp: "2022-03-15T08:48:04Z"
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
.: {}
f:ca.crt: {}
f:namespace: {}
f:token: {}
f:metadata:
f:annotations:
.: {}
f:kubernetes.io/service-account.name: {}
f:kubernetes.io/service-account.uid: {}
f:type: {}
manager: kube-controller-manager
operation: Update
time: "2022-03-15T08:48:04Z"
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
f:clusterName: {}
f:controllerEndpoint: {}
manager: manager
operation: Update
time: "2022-03-15T08:48:34Z"
name: kubeslice-rbac-worker-aks-worker-1-token-hml58
namespace: kubeslice-cisco
resourceVersion: "21121"
uid: 611af586-b11d-45d4-a6e0-cee3167e837c
type: kubernetes.io/service-account-token
Get the Network Interface
Get the name of the network interface on the gateway nodes that is the egress interface for external traffic.
warning
The below command does not work for OpenShift clusters.
Use the following command on the gateway node:
ip route get 8.8.8.8 | awk '{ print $5 }'
Example
ip route get 8.8.8.8 | awk '{ print $5 }'
Example Output
eth0
Create the Secrets YAML File
Use base64 encoded values of the namespace
, endpoint
, ca.crt
, and
the token
from the above secrets to create your values.yaml
file.
Create the values.yaml
file using the following template.
info
To understand more about the configuration parameters, see Slice Operator Configuration Parameters.
info
To get the username and password for configuring them under imagePullSecrets
, contact our
Avesha Support at support@avesha.io.
## Base64 encoded secret values for the namespace, endpoint, ca.crt and token from the controller cluster
controllerSecret:
namespace: <encoded_namespace>
endpoint: <encoded_endpoint>
ca.crt: <encoded_ca.crt>
token: <encoded_token>
cluster:
name: <worker cluster>
endpoint: <endpoint of control plane of the worker cluster>
netop:
networkInterface: <network interface value>
# Provide your username, password & email values under imagePullSecrets to create a secret
imagePullSecrets:
repository: https://index.docker.io/v1/
username: <username>
password: <accesstoken of the user>
email: <email ID>
Get the Control Plane Endpoint of the Worker Cluster
Get the control plane's kube-apiserver
endpoint of the worker cluster by using the following command:
kubectl cluster-info
Expected Output
https://34.159.173.186
The following is the sample secrets file used to install the install the Slice Operator.
controllerSecret:
namespace: a3ViZXNsaWNlLWF2ZXNoYQ==
endpoint: aHR0cHM6Ly8xNzIuMTguMC4yOjY0NDM=
ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1EVXhNREEzTkRBd05sb1hEVE15TURVd056QTNOREF3Tmx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9tdDFZbVZ6YkdsalpTMWhkbVZ6YUdFNmEzVmlaWE5zYVdObExYSmlZV010ZDI5eWEyVnlMV3RwYm1RdGQyOXlhMlZ5TFRFaWZRLjBuQzVRR1B5NUxFb1lQV2FfYVpaY1hqM2tjWm9abUNYekE5UWw2U3FwMGRpQ0p2VHAtWmpDa1QzX3k5YVhxTVZKNWJIUnN2SVBELUZKYkZMdVhaV2FmY05INW44ZkNqT25maG5BQ1lJWTZHUEVQQTBDV3ZMMUtNeEpoMjh1aU5HN3dVVUsyTHNhT1BFWUd5OHFZSTN2UEpJR3VvRUlkS0JVYmh4ZUdwTnBFQkM1aDNtVTY2TlV3MUZkWkNSNHBwRWwtYThXbXEtMmNqQUpBSmQ4MDVyQjE1UGM2b1dnc2xqUm5aNVNfeS12clg2dTZ4bVc2UUpYdmQ0bzNMY2QxVnJ2Z2pRczdkSkkyY0I2dnJmVWVPSXFHWWpYM3dKQnBOakFjZlBXeTQ0aG9CY1gtdlFSQ2ZwSndtTDlZX0EyTTRpZG5taE5xZ2dNb1RtaURGZ1NsYy1pZw==
cluster:
name: cluster-worker-1
endpoint: https://10.1.75.49:6443
netop:
networkInterface: eth0
imagePullSecrets:
repository: https://index.docker.io/v1/
username: <username>
password: <access token of the user>
email: <email ID>
Apply the Slice Operator YAML File
The following information is required to apply the YAML file.
Parameter | Description |
---|---|
<cluster name> | The name of the cluster. |
<values> | The file name with the values. |
You must install the Slice Operator in all the registered clusters. To install the Slice Operator:
Switch the context to the worker cluster for which you have created the YAML file.
kubectx <cluster name>
Apply the YAML file on the
kubeslice-system
namespace using the following command:helm install kubeslice-worker kubeslice/kubeslice-worker -f <full path of secrets file>.yaml -n kubeslice-system --create-namespace
Validate the Slice Operator Installation
To validate the Slice Operator installation on the worker cluster, check the pods status
that belong to the kubeslice-system
namespace.
To check if the pods are running, use the following command:
kubectl get pods -n kubeslice-system
Example Output
NAME READY STATUS RESTARTS AGE
forwarder-kernel-jx5wm 1/1 Running 0 3m5s
kubeslice-dns-6bbd47bbb9-jcgsv 1/1 Running 0 3m6s
kubeslice-netop-8n9vh 1/1 Running 0 3m6s
kubeslice-operator-59657fb5f7-nzsth 2/2 Running 0 3m5s
nsm-admission-webhook-k8s-7745c9c4d7-cd9sw 1/1 Running 0 3m5s
nsm-install-crds-h29qp 0/1 Completed 0 3m18s
nsmgr-b4gnt 2/2 Running 0 3m4s
registry-k8s-86667b6cd9-4hzg7 1/1 Running 0 3m6s
You can also validate the spire installation using the following command:
k get pods -n spire
Expected Output
NAME READY STATUS RESTARTS AGE
spire-agent-ms67k 1/1 Running 0 18h
spire-server-0 2/2 Running 0 18h
success
You have successfully installed the Slice Operator on the worker cluster. Repeat the above steps to install the Slice Operator on all the participating worker clusters.