Skip to content

Instantly share code, notes, and snippets.

@robertBrem
Last active Nov 11, 2016
Embed
What would you like to do?
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: registry
spec:
replicas: 1
template:
metadata:
labels:
name: registry
spec:
containers:
- resources:
name: registry
image: registry:2
ports:
- name: registry-port
containerPort: 5000
volumeMounts:
- mountPath: /var/lib/registry
name: images
- mountPath: /certs
name: certs
- mountPath: /auth
name: auth
env:
- name: REGISTRY_AUTH
value: "htpasswd"
- name: REGISTRY_AUTH_HTPASSWD_REALM
value: "Registry Realm"
- name: REGISTRY_AUTH_HTPASSWD_PATH
value: /auth/htpasswd
- name: REGISTRY_HTTP_TLS_CERTIFICATE
value: /certs/fullchain1.pem
- name: REGISTRY_HTTP_TLS_KEY
value: /certs/privkey1.pem
volumes:
- name: images
hostPath:
path: /home/admin/registry/images
- name: certs
hostPath:
path: /home/admin/registry/certs
- name: auth
hostPath:
path: /home/admin/registry/auth
nodeSelector:
name: node4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment