0

I have successfully install aws ssm, and would like to use it to access my private eks cluster. I am having to jump into a bastion host in a public subnet with kubectl commands installed on it. I would like to get rid of this bastion host.

I am able to open a tunnel with ssm using the following command

aws ssm start-session --target <worker node id> --region <eks region> --document-name AWS-StartPortForwardingSession --parameters '{"portNumber":["443"],"localPortNumber":["8443"]}'

I have also updated my local kubeconfig which shows my aws eks context when i run kubectl config get-contexts. Now I could ssh into a worker node from a different terminal once the ssm session is open but I dont want to have to install kubectl on the worker node, but I still would like to access my eks cluster.

My EKS cluster is in a private subnet with a private endpoint. Is there a way to run my kubectl commands locally after opening a ssm session and query my private eks clusters ?

currently i get

couldn't get current server API group list: Get "https://<eks-endpoint>.<region>.eks.amazonaws.com/api?timeout=32s": dial tcp <ip-address>:443: connect: connection refused

0 Answers0