简体   繁体   中英

Cannot connect to the EKS cluster after deploying with bitbucket and terraform

when I deploy my EKS cluster in command line with terraform from my terminal . I have no problem the deployment goes very well I can connect to the cluster and execute commands like kubectl get svc .

However when I go through my bitbucket pipeline the deployment goes well but if I try to connect on command line to my EKS cluster to execute commands.

_ kubectl get svc
Unable to connect to the server: dial tcp: lookup 5078015BC6DAFAE1391368A19FC9.gr7.eu-central-1.eks.amazonaws.com on 192.168.43.1:53: no such host  

So i cheked DNS side on my VPC on EKS ec2 instance:

  • I click on the vpc
  • Action Edit DNS hostnames
  • And i checked if DNS hostnames was enabled

It was activated.

thanks for your help and your advice

I created my cluster manually and was facing same issue, in my case the error was coming because of private cluster. I selected Private Cluster option while creating the cluster. If you can re-create the cluster with public access or use bastion host the error would be resolved. Hope it helps, thanks EKS Cluster Setup

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM