Create EKS kubernetes pod in specific subnet

3/7/2019

I am creating 11 pods on EKS kubernetes. I have two public and two private subnets. In that, I have to move 10 pods in private subnet and 1 pod in public subnet. The reason behind moving in a public subnet is I have to attach public facing load balancer IP to it. But I have not sure how to move particular pod in particular subnet on EKS. I got similar question asked here. But. didn't got answer. All things I am creating via Cloudformation. How can I create particular pod in particular subnet on EKS?

-- ImPurshu
amazon-cloudformation
amazon-eks
amazon-web-services
kubernetes
subnet

1 Answer

3/16/2019

Seems like Kubernetes' nodeSelector is the thing you need. You just have to add a fitting label to the nodes, this answer will help you automate it.

-- Dennis Griesert
Source: StackOverflow