Skip to content

Instantly share code, notes, and snippets.

@akamas
Created October 11, 2021 03:41
Show Gist options
  • Save akamas/e1acdf71011918786b4915878cdca803 to your computer and use it in GitHub Desktop.
Save akamas/e1acdf71011918786b4915878cdca803 to your computer and use it in GitHub Desktop.
k3s-registry-deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: docker-registry
labels:
app: docker-registry
spec:
replicas: 1
selector:
matchLabels:
app: docker-registry
template:
metadata:
labels:
app: docker-registry
spec:
volumes:
- name: registry-pvc-storage
persistentVolumeClaim:
claimName: docker-registry-pvc
containers:
- name: docker-registry
image: registry
ports:
- containerPort: 5000
volumeMounts:
- name: registry-pvc-storage
mountPath: /var/lib/registry
---
apiVersion: v1
kind: Service
metadata:
name: docker-registry-service
spec:
selector:
app: docker-registry
type: NodePort
ports:
- protocol: TCP
port: 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment