Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Created March 17, 2022 22:02
Show Gist options
  • Save rms1000watt/44b86961a251a6910cbbf6d01fb1ecfb to your computer and use it in GitHub Desktop.
Save rms1000watt/44b86961a251a6910cbbf6d01fb1ecfb to your computer and use it in GitHub Desktop.
Docker in K8s with custom DOCKER_HOST (used if docker daemon is daemonset)
apiVersion: v1
kind: Pod
metadata:
name: ryan-smith-test
namespace: default
spec:
containers:
- name: ryan-smith-test
image: public.ecr.aws/docker/library/docker:latest
command:
- sh
- -c
- while :;do sleep 1; done
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: DOCKER_HOST
value: tcp://$(HOST_IP):2375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment