Searching From this tutorial you can setup a private registry using Helm.
It is stated in the documented:
Note: Insecure registries can be used for development, POCs or lab trials. You should not use this in production. There are planty of documents online that guide you through secure registry setup.
Ok, I have searched(and tried) for two days now, and nothing that actually work with openssl and docker-for-mac.
Do you know?
Update:
Steps:
1. Installed cert-manager
2. Follow this, to create a certificate
3. Create an Ingress:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: registry-tls
namespace: default
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
spec:
tls:
- hosts:
- mydomain.dev
- secretName: ca-key-pair
rules:
- host: mydomain.dev
http:
paths:
- backend:
serviceName: mottled-hydra-docker-registry
servicePort: 5000
path: /reg
- Added ca.cert to Keychain on mac
docker push mydomain.dev/mycontainer
Then I get:
The push refers to repository [mydomain.dev/reg/mycontainer]
Get https://mydomain.dev/v2/: x509: certificate is valid for ingress.local, not mydomain.dev
Note?:
1. https://mydomain.dev/v2/
2. ingress.local
kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.245.0.1 <none> 443/TCP 4d
mottled-hydra-docker-registry ClusterIP 10.245.190.70 <none> 5000/TCP 5h
svc for the registry, generated by the Helm chart(cert-manager):
apiVersion: v1 │
│kind: Service │
│metadata: │
│ creationTimestamp: "2019-03-28T12:46:06Z" │
│ labels: │
│ app: docker-registry │
│ chart: docker-registry-1.7.0 │
│ heritage: Tiller │
│ release: mottled-hydra │
│ name: mottled-hydra-docker-registry │
│ namespace: default │
│ resourceVersion: "692261" │
│ selfLink: /api/v1/namespaces/default/services/mottled-hydra-docker-registry │
│ uid: 742fe252-5157-11e9-851d-ba21af21c59c │
│spec: │
│ clusterIP: 10.245.190.70 │
│ ports: │
│ - name: registry │
│ port: 5000 │
│ protocol: TCP │
│ targetPort: 5000 │
│ selector: │
│ app: docker-registry │
│ release: mottled-hydra │
│ sessionAffinity: None │
│ type: ClusterIP │
│status: │
│ loadBalancer: {}