KSPM: What are the conditions under which we need to provide cluster resource identifier value separately?
Question
When onboarding a Kubernetes cluster on Cortex cloud under Settings -> Data Sources & Integrations -> Kubernetes -> Deploy, What are the conditions under which we need to provide cluster resource identifier value separately under "Edit Profile"?
Environment
- Cortex Cloud.
- Kubernetes connector
- GKE or EKS clusters with metadata service disabled
- AKS clusters with non-default nodes managed resource group
- Fargate clusters.
Answer
Kubernetes connector normally performs cluster resource identifier automatically, but in some cases when the automatic discovery(meta-data service) is blocked, we may need to to provide the cluster resource identifier manually.
The resource identifier must be specified for the following.
- GKE or EKS clusters with metadata service disabled
- AKS clusters with non-default nodes managed resource group
- Fargate clusters.
If we are manually adding the cluster resource Identifier, below is the format in which they are supposed to be added.
|
Kubernetes Distribution |
Expected Data (“Cluster resource identifier” field) |
Format Example |
|
EKS |
Cluster’s ARN |
arn:aws:eks:<region>:<account_id>:cluster/<cluster_name> |
|
GKE |
Cluster URI |
projects/<project_id>/zones/<zone_id>/clusters/<cluster_name> |
|
AKS |
Cluster Resource Identifier |
/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.ContainerService/managedClusters/<cluster_name> |
|
OpenShift (On-Prem) |
Cluster Name (suffix of the cluster URI) |
<cluster_name> |
For vanilla k8s, we can set the CLUSTER_URI to:
/clusterId/<kube-system-namespace-UID>/apiServerHostname/<any-custom-name>
Additional Information
When you add cluster resource identifier to Settings -> Data Sources & Integrations -> Kubernetes -> Deploy -> Edit profile. The config gets added to the values values.yaml file under optional values section.
global:
optionalValues:
CLUSTER_URI: "<pre-defined-uri>"