--- apiVersion: apps/v1 kind: Deployment metadata: name: container-registry-deployment namespace: kube-system labels: app: container-registry spec: replicas: 1 selector: matchLabels: app: container-registry template: metadata: labels: app: container-registry spec: containers: - image: registry:3.0.0-rc.2 name: container-registry imagePullPolicy: IfNotPresent ports: - containerPort: 5000 env: - name: REGISTRY_STORAGE_DELETE_ENABLED value: "true" volumeMounts: - name: registry-vol mountPath: /var/lib/registry volumes: - name: registry-vol hostPath: path: /mnt/registry/ type: Directory --- apiVersion: v1 kind: Service metadata: name: container-registry namespace: kube-system labels: app: container-registry spec: type: NodePort selector: app: container-registry ports: - port: 5000 targetPort: 5000 nodePort: 30000