Skip to content

Instantly share code, notes, and snippets.

@giladno
Last active July 8, 2020 10:11
Show Gist options
  • Save giladno/a06c13b3fe197ea0738af9566ac02801 to your computer and use it in GitHub Desktop.
Save giladno/a06c13b3fe197ea0738af9566ac02801 to your computer and use it in GitHub Desktop.
Docker
  • Stop and remove all containers
docker container stop $(docker container ls -aq)
  • Remove all stopped containers, dangling and unused images, unused networks and unused volumes
docker system prune -a --volumes
  • Run docker-compose on system startup
  • Make sure all have restart: always
  • Add user to docker group sudo usermod -aG docker ${USER}
sudo systemctl enable docker
docker-compose up -d
  • Connect from local docker
postgres://host.docker.internal/db
  • Port forward
kubectl port-forward service/hello-kubernetes 8081:80 -n hello
  • Create config
aws eks --region us-east-1 update-kubeconfig --name cluster_name
  • Proxy API
kubectrl proxy
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}')

Then open http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/overview?namespace=default

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