| सर्वर दुनिया | गोपनीयता नीति | सहायता / संपर्क करें |
1124 / 128939271
|
MicroK8s : रजिस्ट्री सक्षम करें2024/06/14 |
|
MicroK8s अंतर्निर्मित रजिस्ट्री को सक्षम करने के लिए, निम्नानुसार कॉन्फ़िगर करें। |
|
| [1] | प्राथमिक नोड पर अंतर्निहित रजिस्ट्री सक्षम करें। सक्षम करने के बाद, [kube-proxy] [0.0.0.0:32000] पर सुनता है। |
|
# बैकएंड स्टोरेज आकार 30G के साथ रजिस्ट्री सक्षम करें # यदि यह निर्दिष्ट नहीं है तो डिफ़ॉल्ट आकार 20G है root@dlp:~# microk8s enable registry:size=30Gi
Infer repository core for addon registry
Infer repository core for addon hostpath-storage
Enabling default storage class.
WARNING: Hostpath storage is not suitable for production environments.
A hostpath volume can grow beyond the size limit set in the volume claim manifest.
deployment.apps/hostpath-provisioner created
storageclass.storage.k8s.io/microk8s-hostpath created
serviceaccount/microk8s-hostpath created
clusterrole.rbac.authorization.k8s.io/microk8s-hostpath created
clusterrolebinding.rbac.authorization.k8s.io/microk8s-hostpath created
Storage will be available soon.
WARNING: This style of specifying size is deprecated. Use newer --size argument instead.
The registry will be created with the size of 30Gi.
Default storage class will be used.
namespace/container-registry created
persistentvolumeclaim/registry-claim created
deployment.apps/registry created
service/registry created
configmap/local-registry-hosting configured
# [registry] पॉड प्रारंभ होता है root@dlp:~# microk8s kubectl get pods -n container-registry NAME READY STATUS RESTARTS AGE registry-6c9fcc695f-fr5br 1/1 Running 0 65s |
| [2] | रजिस्ट्री को सक्षम करने के बाद, इसे सामान्य ऑपरेशन के साथ उपयोग करना संभव है। |
|
root@dlp:~# podman images REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/library/ubuntu latest 17c0145030df 2 weeks ago 78.7 MB # टैग करें और पुश करें root@dlp:~# podman tag 17c0145030df localhost:32000/ubuntu:registry root@dlp:~# podman push localhost:32000/ubuntu:registry --tls-verify=false Getting image source signatures Copying blob 42d3f8788282 done | Copying config 17c0145030 done | Writing manifest to image destinationroot@dlp:~# podman images REPOSITORY TAG IMAGE ID CREATED SIZE localhost:32000/ubuntu registry 17c0145030df 2 weeks ago 78.7 MB docker.io/library/ubuntu latest 17c0145030df 2 weeks ago 78.7 MB |
| Sponsored Link |
|
|