aws / aws-cloud-map-mcs-controller-for-k8s

K8s controller implementing Multi-Cluster Services API based on AWS Cloud Map.
https://aws.amazon.com/blogs/opensource/kubernetes-multi-cluster-service-discovery-using-open-source-aws-cloud-map-mcs-controller/
Apache License 2.0
88 stars 28 forks source link

Update docs with instructions for the new AWS CNI to allow connecting to external service #313

Open Soni96pl opened 7 months ago

Soni96pl commented 7 months ago

Setup based on docs doesn't work on a fresh cluster with AWS CNI above version 1.12.6 as it doesn't allow routing services to endpoints outside the cluster. At first I switched to Calico which seemed to fix the issue, but there is a simpler way:

kubectl set env daemonset aws-node -n kube-system "AWS_EXTERNAL_SERVICE_CIDRS=<Another Cluster CIDR>/16"

This isn't strictly cloud map issue, but I believe docs will benefit from including this as currently the steps can't be followed exactly. I'm willing to submit a PR adding section to the docs if there is approval, though I think someone more versed might be better suited as I haven't explored alternative solutions.

Hope this helps someone ✌️

AWS_EXTERNAL_SERVICE_CIDRS was introduced in: https://github.com/aws/amazon-vpc-cni-k8s/pull/2243