How to add the private registry to Rancher desktop on windows? #1041
Answered
by
vladonemo
VatthanachaiW
asked this question in
Q&A
-
Hi All, I have some questions about login in or setting up the private registry to the Rancher Desktop on the Windows Platform. Thank you very much. |
Beta Was this translation helpful? Give feedback.
Answered by
vladonemo
Jan 5, 2022
Replies: 1 comment 1 reply
-
You can start deploying the private registry in kubernetes, e.g like this: apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
selector:
k8s-app: kube-registry
version: v0
template:
metadata:
labels:
k8s-app: kube-registry
version: v0
spec:
containers:
- name: registry
image: registry:2
resources:
limits:
cpu: 100m
memory: 200Mi
env:
- name: REGISTRY_HTTP_ADDR
value: :5000
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: /var/lib/registry
volumeMounts:
- name: image-store
mountPath: /var/lib/registry
ports:
- containerPort: 5000
name: registry
protocol: TCP
volumes:
- name: image-store
hostPath:
path: /var/lib/registry-storage
---
apiVersion: v1
kind: Service
metadata:
name: kube-registry
namespace: kube-system
labels:
k8s-app: kube-registry
kubernetes.io/name: "KubeRegistry"
spec:
selector:
k8s-app: kube-registry
ports:
- name: registry
port: 5000
targetPort: 5000
protocol: TCP
type: LoadBalancer just save this one as a file and call Then open the rancher-desktop WSL shell and modify the content of the file mirrors:
"<hostname>:5000":
endpoint:
- "http://<hostname>:5000" where hostname is your machine hostname. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
VatthanachaiW
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can start deploying the private registry in kubernetes, e.g like this: