Permalink
Find file Copy path
c199040 Nov 7, 2018
1 contributor

Users who have contributed to this file

70 lines (69 sloc) 1.31 KB
---
apiVersion: v1
kind: Namespace
metadata:
name: container-registry
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: registry-claim
namespace: container-registry
spec:
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 20Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: registry
name: registry
namespace: container-registry
spec:
replicas: 1
template:
metadata:
labels:
app: registry
spec:
containers:
- name: registry
image: cdkbot/registry-$ARCH:2.6
env:
- name: REGISTRY_HTTP_ADDR
value: :5000
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: /var/lib/registry
ports:
- containerPort: 5000
name: registry
protocol: TCP
volumeMounts:
- mountPath: /var/lib/registry
name: registry-data
volumes:
- name: registry-data
persistentVolumeClaim:
claimName: registry-claim
---
apiVersion: v1
kind: Service
metadata:
labels:
app: registry
name: registry
namespace: container-registry
spec:
type: NodePort
selector:
app: registry
ports:
- name: "registry"
port: 5000
targetPort: 5000
nodePort: 32000