Skip to content

Instantly share code, notes, and snippets.

@dohsimpson
Created January 7, 2025 04:13
Show Gist options
  • Save dohsimpson/22eb11d51889dc3f866ebcabf8ff9967 to your computer and use it in GitHub Desktop.
Save dohsimpson/22eb11d51889dc3f866ebcabf8ff9967 to your computer and use it in GitHub Desktop.
dind-in-kubernetes
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dind
namespace: public
labels:
app: dind
annotations: {}
spec:
selector:
matchLabels:
app: dind
template:
metadata:
labels:
app: dind
spec:
nodeSelector:
main2: "true"
containers:
- name: dind
image: docker:20-dind
securityContext:
privileged: true
# optional resource constraints
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "1"
memory: "2Gi"
env:
- name: DOCKER_TLS_CERTDIR
value: ""
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
- name: docker-socket
mountPath: /var/run
subPath: docker.sock
volumes:
- name: docker-graph-storage
hostPath:
path: /ANYDIR/docker-graph
type: DirectoryOrCreate
- name: docker-socket
hostPath:
path: /ANYDIR/docker-socket
type: DirectoryOrCreate
replicas: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment