kind: Namespace apiVersion: v1 metadata: name: bing --- apiVersion: v1 kind: ConfigMap metadata: name: docker-registry data: config.yml: | version: 0.1 log: fields: service: registry storage: cache: blobdescriptor: inmemory filesystem: rootdirectory: /var/lib/registry http: addr: :5000 headers: X-Content-Type-Options: [nosniff] health: storagedriver: enabled: true interval: 10s threshold: 3 --- apiVersion: apps/v1 kind: Deployment metadata: name: registry namespace: bing spec: selector: matchLabels: app: registry version: "2.0" template: metadata: labels: app: registry version: "2.0" spec: containers: - name: registry image: registry:2 resources: limits: memory: "512Mi" cpu: "500m" ports: - containerPort: 5000 volumeMounts: - name: library mountPath: /var/lib/registry - name: config mountPath: /etc/docker/registry volumes: - name: library nfs: path: /data2/registry server: 192.168.0.248 - name: config configMap: name: docker-registry --- apiVersion: v1 kind: Service metadata: name: registry namespace: bing spec: selector: app: registry version: "2.0" ports: - port: 5000 targetPort: 5000 nodePort: 30500 type: NodePort