container-registry.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: container-registry-deployment
  6. namespace: kube-system
  7. labels:
  8. app: container-registry
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. app: container-registry
  14. template:
  15. metadata:
  16. labels:
  17. app: container-registry
  18. spec:
  19. containers:
  20. - image: registry:3.0.0-rc.2
  21. name: container-registry
  22. imagePullPolicy: IfNotPresent
  23. ports:
  24. - containerPort: 5000
  25. env:
  26. - name: REGISTRY_STORAGE_DELETE_ENABLED
  27. value: "true"
  28. volumeMounts:
  29. - name: registry-vol
  30. mountPath: /var/lib/registry
  31. volumes:
  32. - name: registry-vol
  33. hostPath:
  34. path: /mnt/registry/
  35. type: Directory
  36. ---
  37. apiVersion: v1
  38. kind: Service
  39. metadata:
  40. name: container-registry
  41. namespace: kube-system
  42. labels:
  43. app: container-registry
  44. spec:
  45. type: NodePort
  46. selector:
  47. app: container-registry
  48. ports:
  49. - port: 5000
  50. targetPort: 5000
  51. nodePort: 30000