Skip to content

Instantly share code, notes, and snippets.

@tobemedia
Created July 29, 2019 06:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save tobemedia/2144d74d232ccce8972613e8ae13b054 to your computer and use it in GitHub Desktop.
Save tobemedia/2144d74d232ccce8972613e8ae13b054 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"
@tobemedia
Copy link
Author

Workaround to fix docker-on-docker dns resolution errors at AWS EKS
use: eksctl create cluster --config-file aws_eks_config.yml
Woraround based on the comments at the Jupyter Forum: https://discourse.jupyter.org/t/binder-deployed-in-aws-eks-domain-name-resolution-errors/766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment