Configure Data Plane
As lifecycle changes occur and clusters and datacenters are created and terminated, adjust the Data Plane
installation accordingly.
Whenever a cluster is installed in Data Plane Mode
, it needs to be configured to communicate with an independent cluster installed as the Control Plane
.
Prerequisites
-
Download the create-clientconfig.sh script that contains:
-
kubectl
-
yq
-
Assumptions
-
The user can access all 3 clusters with
kubectl
. -
The default
kubeconfig
located at~/.kube/config
provides access to all 3 clusters. -
Mission Control is installed in each of the 3 clusters in the
mission-control
namespace.
Configure Data-Plane updates
In this example there are three (3) Kubernetes clusters named control
, east
, and west
.
Configure the Control Plane
cluster to give it access to the east
and west
clusters.
-
Configure access for the
east
cluster by running the following script:create-clientconfig.sh --namespace mission-control --src-context east --dest-context control --output-dir east-clientconfig --service-account mission-control
Description of the options follows:
--namespace specifies the namespace in which the
ClientConfig
andkubeconfig
secret should be created.--src-context specifies the
Data Plane
cluster. It is the source cluster from which to obtain credentials that get stored in a secret and referenced by the generatedClientConfig
.--dest-context specifies the
Control Plane
cluster. It is the cluster into which thekubeconfig secret
andClientConfig
should be created.--output-dir specifies the directory in which to store generated manifests for the
kubeconfig secret
andClientConfig
. If not specified a temp directory is used.Sample results
Creating clientconfigs/kubeconfig Creating secret east-config Error from server (NotFound): secrets "east-config" not found secret/east-config created Creating ClientConfig clientconfigs/east.yaml clientconfig.config.k8ssandra.io/east created
The error message can be ignored.
The
east-clientconfig
directory contains two files -east.yaml
andkubeconfig
.kubeconfig
is akubeconfig
file whose contents vary based on the Kubernetes distribution or cloud provider that you are using.east.yaml
should look like this:apiVersion: config.k8ssandra.io/v1beta1 kind: ClientConfig metadata: name: east spec: contextName: east kubeConfigSecret: name: east-config
In the
Control Plane
cluster look for akind: ClientConfig
namedeast
and asecret
namedeast-config
in themission-control namespace
. -
Repeat step 1 for the
west
cluster.