Configuring the Kubernetes Client (kubectl)
Several Kubernetes configuration and diagnostic tasks using kubectl will be performed on the bastion. In order to do that, the kubectl utility needs be configured with bastion credentials.
To configure kubectl:
- Connect to the bastion instance and run the following command:
# aws eks update-kubeconfig \
--name <Cluster Name> - The command will return:
Updated context <eks cluster arn> in /home/centos/.kube/config
Example:# aws eks update-kubeconfig \r
--name srgdemo-cluste
Updated context arn:aws:eks:eu-central-1:115370848038:cluster/srgdemo-cluster in /home/centos/.kube/config
- On the bastion, check the Kubernetes service status by running:
# kubectl get svc
Example output:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 172.20.0.1 <none> 443/TCP 54m
The EKS control plane is now ready and accessible from the bastion.
Next Step: Applying the AWS Config Map