Integrating Kube Detector

The following steps provide instructions on how to integrate kube-detector in the cluster. Kube-detector can be integrated in two ways as listed below:

In-cluster:

In this method, you need to install the Kube Detector service in the cluster where the applications are running. Choose this if you do not wish to share your Kubernetes cluster’s kubeconfig file with Delivery Shield.

  1. Create a new namespace in the target cluster by executing the command given below:

kubectl create ns <namespace>
  1. Navigate to Setup > Clusters.

  2. Click on the three vertical dots in the cluster details page as shown below:

  3. Download the In-cluster file.

  4. Edit the downloaded incluster file and update the new namespace value in the ClusterRoleBinding section as shown below:

  1. Apply the file in the target cluster namespace by executing the command given below:

kubectl apply -f <Path to file> -n <namespace>
  1. The Kubernetes cluster is successfully integrated with SSD. It starts collecting data for the services that are added in the namespaces and the applications appear in the Delivery Shield UI.

Remote:

In this method, you can install the Kube-detector service in the Delivery Shield namespace. If you select this method, your target cluster's kubeconfig file will be shared with Delivery Shield.

  1. Navigate to Setup > Clusters.

  2. Click on the three vertical dots in the cluster details page as shown below:

  1. Click on the three vertical dots in the cluster details below and download the remote file.

  2. Next, create a Kubernetes secret in the SSD namespace and store your target cluster's kubeconfig file in it using the following command:

kubectl create secret generic <Secret name> --from-file=<Path to Kubeconfig> -n <SSD Namespace>
  1. Open the downloaded remote file, and update the following fields.

  • secretName - The name of the secret created in the previous step.

  • key - The key in the secret that points to the kubeconfig data.

  • path - The value in the secret that points to the kubeconfig.

  1. Add the namespace values that you want to monitor, in the kube-detector secret section of the downloaded remote file.

  1. Apply the kube-detector file in the SSD namespace by executing the command given below:

kubectl apply -f <Path to file> -n <namespace>

The Kubernetes cluster is now successfully integrated with SSD.

Last updated