Skip to content

Instantly share code, notes, and snippets.

@ajayk
Forked from tobemedia/aws_eks_config
Created October 24, 2019 15:54
Show Gist options
  • Save ajayk/20e3e3fc5cbaa3eee0ed0514ee3f2d42 to your computer and use it in GitHub Desktop.
Save ajayk/20e3e3fc5cbaa3eee0ed0514ee3f2d42 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