Skip to content

Instantly share code, notes, and snippets.

@carloscarnero
Created August 13, 2021 18:41
Show Gist options
  • Save carloscarnero/2a3e1b39fb7cf12b0df85121d9d16429 to your computer and use it in GitHub Desktop.
Save carloscarnero/2a3e1b39fb7cf12b0df85121d9d16429 to your computer and use it in GitHub Desktop.
A simple deployment that allows connection with the underlying Docker daemon
apiVersion: apps/v1
kind: Deployment
metadata:
name: dind-explorer
labels:
app: dind-explorer
spec:
replicas: 1
selector:
matchLabels:
app: dind-explorer
template:
metadata:
labels:
app: dind-explorer
spec:
containers:
- name: docker
image: docker:19.03.15
command: [ "/bin/sh", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
volumeMounts:
- name: docker-socket
mountPath: /var/run/docker.sock
readOnly: false
- name: docker
mountPath: /var/lib/docker
readOnly: false
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock
- name: docker
hostPath:
path: /var/lib/docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment