apiVersion: v1 kind: Secret metadata: name: registry-auth namespace: gooseek type: Opaque stringData: htpasswd: | admin:$2y$05$A6oxuQhSjFObdjDsbjiWee.FJ62XQrc6BhLfzCMofY.9A/qQ050v6 --- apiVersion: v1 kind: ConfigMap metadata: name: registry-config namespace: gooseek data: config.yml: | version: 0.1 log: level: info storage: filesystem: rootdirectory: /var/lib/registry delete: enabled: true http: addr: :5000 headers: X-Content-Type-Options: [nosniff] auth: htpasswd: realm: GooSeek Registry path: /auth/htpasswd --- apiVersion: apps/v1 kind: Deployment metadata: name: registry namespace: gooseek spec: replicas: 1 selector: matchLabels: app: registry template: metadata: labels: app: registry spec: containers: - name: registry image: registry:2 ports: - containerPort: 5000 volumeMounts: - name: registry-data mountPath: /var/lib/registry - name: registry-config mountPath: /etc/docker/registry - name: registry-auth mountPath: /auth resources: requests: memory: "64Mi" cpu: "50m" limits: memory: "256Mi" cpu: "200m" volumes: - name: registry-data persistentVolumeClaim: claimName: registry-pvc - name: registry-config configMap: name: registry-config - name: registry-auth secret: secretName: registry-auth