Connect to cluster through VPC

12/8/2017

I have a kubernetes cluster with ec2 nodes, how can I connect to pods in this cluster externally from my local machine or another ec2 instance not in the cluster? I have the VPC ID and the cluster namespace.

-- appdap1
amazon-ec2
amazon-vpc
amazon-web-services
kubernetes

1 Answer

12/8/2017

AWS announced EKS ( Elastic Kubernetes Service ) as new service few days ago. However it is still in preview the time that I am writing this answer.

Anyway, you can use kops which is built for this purpose ; to make marriage between k8s and AWS .

You will do something like the following:

kops create cluster --name=k8s.example.com \
   --state=s3://cluster-state \
   --zones=eu-west-1a \
   --node-count=2 \ 
   --node-size=t2.micro \ 
   --master-size=t2.micro \ 
   --dns-zone=k8s.example.com
-- Abdennour TOUMI
Source: StackOverflow