Configure access to a Kubernetes cluster on Amazon Elastic Kubernetes Service (EKS),
Google Kubernetes Engine (GKE), or Azure Kubernetes Service (AKS) using the respective CLI
and kubectl.
EKS cluster access setup
./discli agent applyOperatorVersion —version=<latest
version>. After this, you can manually update the other services
on the agent.Prerequisites:
Before you begin, ensure the following:
-
You have valid AWS access credentials (Access Key ID and Secret Access Key).
-
You have permission to access the target EKS cluster.
-
kubectlis installed on your local machine.
Steps to configure EKS cluster access setup:
- If the AWS CLI is not already installed, install it using the official AWS instructions appropriate for your operating system.
- Run the
aws configurecommand and provide your AWS credentials when prompted. This sets up your AWS access key, secret key, default region, and output format. - List the EKS clusters available in your AWS account using
aws eks list-clusterscommand. Confirm that your target cluster (for example,<your-cluster-name>) appears in the output. - Configure your local kubeconfig file to connect to the EKS cluster using
aws eks update-kubeconfig --name --region us-east-2command. This updates (or creates) the kubeconfig entry required forkubectlto communicate with the cluster. -
Once the kubeconfig is updated, verify connectivity by running any of the following commands:
kubectl get nodes kubectl get pods -ASuccessful output confirms that your local environment is connected to the EKS cluster.
-
To view all configured Kubernetes contexts:
kubectl config get-contexts - To switch to a specific cluster
context:
kubectl config use-context <cluster-name-from-above-command>
You can now execute kubectl commands against the specified EKS
cluster. After verifying cluster connectivity, return to Install and Download Agent to
proceed with the installation.
GKE cluster access setup
Prerequisites:
Before you begin, ensure the following:
- You have a valid Google Cloud Platform (GCP) account.
- You have permission to access the target GKE cluster.
- You have one of the following IAM roles:
roles/container.admin, orroles/container.clusterAdmin
- kubectl is installed on your local machine.
- Google Cloud CLI (CLI) is installed locally.
Steps to configure GKE cluster access setup
- Authenticate with Google Cloud by running:
gcloud auth login - Specify the project that contains your GKE cluster:
gcloud config set project <project-id> - Retrieve the list of clusters in the selected project:
gcloud container clusters list. Confirm that your target cluster appears in the output. - Update your local kubeconfig to connect to the GKE cluster:
This creates or updates the kubeconfig entry required for kubectl to communicate with the cluster.gcloud container clusters get-credentials <cluster-name> --region <region> -
Verify cluster connectivity:
kubectl get nodes kubectl get pods -ASuccessful output confirms that your local environment is connected to the GKE cluster.
-
View or switch Kubernetes contexts (optional)
To list all configured contexts:
kubectl config get-contextsTo switch to a specific context:
kubectl config use-context <context-name>
Storage class requirement
The GKE cluster must include a CSI-compliant ReadWriteMany (RWX) storage class.
- Standard GCE Persistent Disks (for example,
standard,premium-rwo) are not supported as they provide ReadWriteOnce (RWO) access only. - Supported options include:
- Google Cloud Filestore (filestore CSI driver)
- Custom NFS-based CSI provisioners
-
To verify available storage classes:
kubectl get storageclasses
- If the GKE cluster is configured as a private cluster, access requires:
- Authorized Networks, or
- A bastion host with network access to the cluster
- If the installing user does not have the required IAM roles, the
installation fails with RBAC errors related to:
- ClusterRoles
- ClusterRoleBindings
- Roles
- RoleBindings
You can now run kubectl commands against the specified GKE cluster.
After verifying cluster connectivity, return to Install and download agent to proceed with
the installation.
AKS cluster access setup
Prerequisites
Before you begin, ensure the following:
- You have a valid Microsoft Azure account.
- You have permission to access the target AKS cluster.
- You have one of the following Azure RBAC roles:
- Azure Kubernetes Service Cluster Admin Role, or
- Azure Kubernetes Service Cluster User Role
kubectlis installed on your local machine.- Azure CLI (az) is installed locally.
Steps to configure AKS cluster access
- Authenticate with Azure by running:
az login - Set the target subscription:
az account set --subscription <subscription-id> - Retrieve the list of clusters in your subscription:
az aks list --output table. Confirm that your target cluster appears in the output. - Update your local kubeconfig to connect to the AKS cluster:
This creates or updates the kubeconfig entry required foraz aks get-credentials --resource-group <resource-group> --name <cluster-name>kubectlto communicate with the cluster. -
Verify cluster connectivity:
kubectl get nodes kubectl get pods -ASuccessful output confirms that your local environment is connected to the AKS cluster.
-
View or switch Kubernetes contexts (optional)
To list all configured contexts:
kubectl config get-contextsTo switch to a specific context:
kubectl config use-context <context-name>
Storage class requirement
The AKS cluster must include a CSI-compliant ReadWriteMany (RWX) storage class.
- Standard Azure Managed Disks (for example,
managed,managed-csi,managed-premium) are not supported as they provide ReadWriteOnce (RWO) access only. - Supported options include:
- Azure Files CSI driver (
file.csi.azure.com) - Custom NFS-based CSI provisioners
- Azure Files CSI driver (
-
To verify available storage classes:
kubectl get storageclasses - Ensure a storage class with
file.csi.azure.comprovisioner and ReadWriteMany support is available and set as the cluster default.
- If the AKS cluster is configured as a private cluster, access requires:
- Authorized IP ranges, or
- A VPN/ExpressRoute connection, or
- A bastion host with network access to the cluster
- If the installing user does not have the required Azure RBAC roles, the
installation fails with errors related to:
- ClusterRoles
- ClusterRoleBindings
- Roles
- RoleBindings
You can now run kubectl commands against the specified AKS cluster.
After verifying cluster connectivity, return to Install and download agent to proceed
with the installation.