Dell NativeEdge: NativeEdge Dağıtımı için Calico'yu dağıtmaya çalışırken çekme hızı sınırlarını çözme

Resumen: Bu makalede, indirme hızı sınırı sorunlarını önlemek için Docker Hub ile nasıl kimlik doğrulanacağı özetlenmektedir.

Este artículo se aplica a Este artículo no se aplica a Este artículo no está vinculado a ningún producto específico. No se identifican todas las versiones del producto en este artículo.

Síntomas

NativeEdge Orchestrator 2.1.0.0 için kapsayıcı ağ arayüzü (CNI) olarak Calico önerilirCalico'yu
yükleme değişiklikleri için talimatlar NativeEdge Orchestrator Dağıtım Rehberi'nde bulunur. Ancak Calico'nun kurulum işlemi sırasında Docker Hub'dan indirme yapar. Docker Hub, Calico kurulumu sırasında karşılaşılabilecek bir indirme hızı sınırı uygular. (Hız sınırıyla ilgili daha fazla ayrıntı docker.com'da bulunabilir.)

Kullanıcı yüklemeden sonra bölmeleri listelediğinde, kullanıcı patiska bölmesinin bir Init:ImagePullBackOff içinde olduğunu görebilir ve bu da kapsayıcıyı indirirken sorunlar olduğunu gösterir.
 
#kubectl get pods -A

NAMESPACE         NAME                                       READY   STATUS                  RESTARTS   AGE
kube-system       local-path-provisioner-957fdf8bc-cl2nl     0/1     Pending                 0          6m50s
kube-system       metrics-server-648b5df564-bncjh            0/1     Pending                 0          6m50s
kube-system       coredns-77ccd57875-cng6c                   0/1     Pending                 0          6m50s
kube-system       calico-kube-controllers-67c64d8b8f-p868c   0/1     Pending                 0          6m39s
kube-system       calico-node-6q82x                          0/1     Init:ImagePullBackOff   0          6m37s

Bu, patiska düğüm bölmesini tanımladığımızda daha fazla görülebilir
#kubectl describe pod calico-node-6q82x -n kube-system
Name:                 calico-node-xscmk
Namespace:            kube-system
..
Events:
  Type     Reason     Age                 From               Message
  ----     ------     ----                ----               -------
  Normal   Scheduled  2m4s                default-scheduler  Successfully assigned kube-system/calico-node-xscmk to sre08129
  Warning  Failed     81s (x2 over 2m2s)  kubelet            Failed to pull image "docker.io/calico/cni:v3.28.0": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/calico/cni:v3.28.0": failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/calico/cni/manifests/sha256:7a3a5cf6c79243ba2de9eef8cb20fac7c46ef75b858956b9884b0ce87b9a354d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
  Normal   Pulling    41s (x4 over 2m3s)  kubelet            Pulling image "docker.io/calico/cni:v3.28.0"
  Warning  Failed     40s (x2 over 106s)  kubelet            Failed to pull image "docker.io/calico/cni:v3.28.0": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/calico/cni:v3.28.0": failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/calico/cni/manifests/sha256:cef0c907b8f4cadc63701d371e6f24d325795bcf0be84d6a517e33000ff35f70: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
  Warning  Failed     40s (x4 over 2m2s)  kubelet            Error: ErrImagePull
  Normal   BackOff    13s (x6 over 2m1s)  kubelet            Back-off pulling image "docker.io/calico/cni:v3.28.0"
  Warning  Failed     13s (x6 over 2m1s)  kubelet            Error: ImagePullBackOff

Kullanıcının yukarıdan da görebileceği gibi, bölme şu nedenlerle indirilemiyor:
"Too Many Requests - Server message: toomanyrequests: Çekme hızı sınırınıza ulaştınız. Kimlik doğrulaması ve yükseltme yaparak sınırı artırabilirsiniz: https://www.docker.com/increase-rate-limit"

Causa

Bu sorun, dockerhub tarafından ayarlanan çekme hızı sınırları nedeniyle oluşur - ayrıntılar için https://www.docker.com/increase-rate-limit bakın.

Resolución

Kullanıcı kimliği doğrulanmış bir docker hub hesabı kullanıyorsa, bu, kullanıcının daha yüksek bir bireysel çekme hızı sınırına sahip olabileceği anlamına gelir.
  1. docker.io'da bir hesap oluşturun 
  2. kube-system ad alanında bir gizli dizi oluşturun. Bu örnekte, docker.io'da bir hesabı kaydetmek için kullanılan kimlik bilgileri kullanılarak regcred adlı bir gizli dizi oluşturulur.
    kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=dockeriousername --docker-password=dockeriopassword --docker-email=emailusertoregsisterondockerio --namespace="kube-system"
  3. Kullanıcının, az önce oluşturulan gizli diziyi (regcred) kullanmak için calico.yaml dosyasını düzenlemesi gerekir.
  4. Kullanıcı template.spec içinde aşağıdakileri içermelidir:
    imagePullSecrets: 
            - name: regcred
     
    1. Referans için burada gerçek bir örnek verilmiştir
      spec:
        selector:
          matchLabels:
            k8s-app: calico-node
          ...
        template:
          metadata:
            labels:
              k8s-app: calico-node
          spec:
            nodeSelector:
             ...
            hostNetwork: true
            tolerations:
            ...
            serviceAccountName: calico-node
            ...
            initContainers:
            ...  
            imagePullSecrets: 
              - name: regcred
    2. Önemli: Yalnızca calico-node şablonuna imagePullSecrets özelliğinin eklenmesi gerekir.
  5. Değişikliklerden sonra calico.yaml'ı uygulayın
    kubectl apply -f calico.yaml
    poddisruptionbudget.policy/calico-kube-controllers created
    serviceaccount/calico-kube-controllers created
    serviceaccount/calico-node created
    serviceaccount/calico-cni-plugin created
    configmap/calico-config created
    customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/bgpfilters.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/caliconodestatuses.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/ipreservations.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org created
    customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org created
    clusterrole.rbac.authorization.k8s.io/calico-kube-controllers created
    clusterrole.rbac.authorization.k8s.io/calico-node created
    clusterrole.rbac.authorization.k8s.io/calico-cni-plugin created
    clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers created
    clusterrolebinding.rbac.authorization.k8s.io/calico-node created
    clusterrolebinding.rbac.authorization.k8s.io/calico-cni-plugin created
    daemonset.apps/calico-node created
    deployment.apps/calico-kube-controllers created
  1. Kullanıcı, kubernetes kümesinin başarıyla çalıştığını görmelidir.
    kubectl get po -A
    NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE
    kube-system   local-path-provisioner-957fdf8bc-x5bn6     1/1     Running   0          22h
    kube-system   coredns-77ccd57875-hf82q                   1/1     Running   0          22h
    kube-system   calico-kube-controllers-8498bff86b-tprzt   1/1     Running   0          9m18s
    kube-system   calico-node-pxwqm                          1/1     Running   0          9m18s
    kube-system   metrics-server-648b5df564-xdh4h            1/1     Running   0          22h

     

Productos afectados

NativeEdge Solutions, NativeEdge
Propiedades del artículo
Número del artículo: 000225940
Tipo de artículo: Solution
Última modificación: 01 oct 2024
Versión:  4
Encuentre respuestas a sus preguntas de otros usuarios de Dell
Servicios de soporte
Compruebe si el dispositivo está cubierto por los servicios de soporte.