-
Notifications
You must be signed in to change notification settings - Fork 1
Part 2: Connecting to an existing (dev, test & live) Kubernetes cluster
This guide help the user to configure the connection to an existing AWS EKS cluster
On your localhost install the kubectl
On the bastion host install and configure AWS CLI
Install the aws-iam-authenticator
To allow the Kubectl to access the AWS EKS control plane, user have to update the kubectl config. To update the config use the following command. Here the region, name of the cluster and user profile have to be updated. (Get the EKS cluster name from AWS console for the Dev, Test and Live accounts. See screenshot below for those used at present.)
aws eks --region eu-west-2 update-kubeconfig --name <eks-cluster-name> --profile <devdsadmin>
If you have multiple contexts you need to switch to the context you wish to use (e.g. KBS on Dev, Test or Live). To find the available contexts run this command:
kubectl config get-contexts
This will list your contexts with the current one asterisked -
To switch to a context run this command:
kubectl config use-context <context name from the previous list of context >
e.g. kubectl config use-context arn:aws:eks:eu-west-2:825668827209:cluster/dev-eks-cluster
Double check you are on the right cluster as this will be the cluster you are deploying to:
kubectl config get-contexts