Skip to content

Instantly share code, notes, and snippets.

@ajayk
Forked from tobemedia/aws_eks_config
Created October 24, 2019 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajayk/5c4e9596f64d7e2e0c643a2e44fbc5af to your computer and use it in GitHub Desktop.
Save ajayk/5c4e9596f64d7e2e0c643a2e44fbc5af to your computer and use it in GitHub Desktop.
EKS DNS Workaround
# file: aws_eks_config.yml
# AWS EKS ClusterConfig used to setup the BinderHub / JupyterNotebooks K8s cluster
# using a workaround from https://discourse.jupyter.org/t/binder-deployed-in-aws-eks-domain-name-resolution-errors/766/10
# to fix broken DNS resolution
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eks-dns-production
region: eu-central-1
nodeGroups:
- name: eks-dns-workers-production
instanceType: t2.small
minSize: 0
maxSize: 4
desiredCapacity: 2
preBootstrapCommands:
# Replicate what --enable-docker-bridge does in /etc/eks/bootstrap.sh
# Enabling the docker bridge network. We have to disable live-restore as it
# prevents docker from recreating the default bridge network on restart
- "cp /etc/docker/daemon.json /etc/docker/daemon_backup.json"
- "echo -e '.bridge=\"docker0\" | .\"live-restore\"=false' > /etc/docker/jq_script"
- "jq -f /etc/docker/jq_script /etc/docker/daemon_backup.json | tee /etc/docker/daemon.json"
- "systemctl restart docker"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment