¿Es este un INFORME DE ERROR o una SOLICITUD DE FUNCIÓN ?: ERROR
Versión de Kubernetes (use la versión de kubectl):
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"08e099554f3c31f6e6f07b448ab3ed78d0520507", GitTreeState:"clean", BuildDate:"2017-01-12T04:57:25Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.3", GitCommit:"029c3a408176b55c30846f0faedf56aae5992e9b", GitTreeState:"clean", BuildDate:"2017-02-15T06:34:56Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
Ambiente:
Proveedor de nube o configuración de hardware: 2GB RAM / 50GB HDD VM
SO (por ejemplo, de / etc / os-release):
NAME = "Ubuntu"
VERSIÓN = "16.04 LTS (Xenial Xerus)"
ID = ubuntu
ID_LIKE = debian
PRETTY_NAME = "Ubuntu 16.04 LTS"
VERSION_ID = "16.04"
HOME_URL = " http://www.ubuntu.com/ "
SUPPORT_URL = " http://help.ubuntu.com/ "
BUG_REPORT_URL = " http://bugs.launchpad.net/ubuntu/ "
UBUNTU_CODENAME = xenial
Kernel (por ejemplo, uname -a):
Linux ubuntu 4.4.0-21-generic # 37-Ubuntu SMP Lunes 18 de abril 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU / Linux
Herramientas de instalación: kubeadm, kubectl, docker
Otros : NA
Qué sucedió: ImagePullBackOff mientras se extraía de un repositorio privado
Lo que esperaba que sucediera: Debería extraer la imagen del repositorio privado
Cómo reproducirlo (de la forma más mínima y precisa posible):
root<strong i="5">@ubuntu</strong>:~# vi /etc/systemd/system/docker.service.d/private-registry.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --insecure-registry 123.456.789.0:9595
docker login 123.456.789.0:9595
información de la ventana acoplable
Contenedores: 87
Corriendo: 18
En pausa: 0
Detenido: 69
Imágenes: 175
Versión del servidor: 1.12.3
Controlador de almacenamiento: aufs
Directorio raíz: / var / lib / docker / aufs
Sistema de archivos de respaldo: extfs
Dirs: 384
Dirperm1 admitido: verdadero
Controlador de registro: archivo json
Controlador de Cgroup: cgroupfs
Complementos:
Volumen: local
Red: superposición nula del puente de host
Enjambre: inactivo
Tiempos de ejecución: runc
Tiempo de ejecución predeterminado: runc
Opciones de seguridad: apparmor seccomp
Versión de kernel: 4.4.0-21-genérico
Sistema operativo: Ubuntu 16.04 LTS
OSType: linux
Arquitectura: x86_64
CPU: 1
Memoria total: 1,937 GiB
Nombre: ubuntu
ID: FXD7: JQJZ: HO3R : D2NK: RWYL: 7DCY : PC2M: 43PM: MA7C: QSPN: 4RGS : 5W6H
Directorio raíz de Docker: / var / lib / docker
Modo de depuración (cliente): falso
Modo de depuración (servidor): falso
Registro: https://index.docker.io/v1/
ADVERTENCIA: Sin soporte de límite de intercambio
Registros inseguros:
123.456.789.0:9595
127.0.0.0/8
Docker -v
Docker versión 1.12.3, compilación 6b644ec
Iniciar kubeadm en master
kubeadm init --token 123456.1234567890123456 --api-publicidad-direcciones 192.168.91.133
Creó la red weive
kubectl aplicar -f https://git.io/weave-kube
apiVersion: v1
kind: Pod
metadata:
name: test-pod
labels:
name: test
spec:
containers:
- image: 123.456.789.0:9595/test
name: test
ports:
- containerPort: 8443
imagePullSecrets:
- name: my-secret
Name: test-pod
Namespace: default
Node: ubuntu-child/192.168.91.134
Start Time: Thu, 16 Feb 2017 12:26:56 +0530
Labels: name=test
Status: Pending
IP: 10.44.0.2
Controllers: <none>
Containers:
test:
Container ID:
Image: 123.456.789.0:9595/test
Image ID:
Port: 8443/TCP
State: Waiting
Reason: ErrImagePull
Ready: False
Restart Count: 0
Volume Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-vkj94 (ro)
Environment Variables: <none>
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
default-token-vkj94:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-vkj94
QoS Class: BestEffort
Tolerations: <none>
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
9s 9s 1 {default-scheduler } Normal Scheduled Successfully assigned test-pod to ubuntu-child
7s 7s 1 {kubelet ubuntu-child} spec.containers{test} Normal Pulling pulling image "123.456.789.0:9595/test"
7s 7s 1 {kubelet ubuntu-child} spec.containers{test} Warning Failed Failed to pull image "123.456.789.0:9595/test": Error: image test:latest not found
7s 7s 1 {kubelet ubuntu-child} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "test" with ErrImagePull: "Error: image test:latest not found"
7s 7s 1 {kubelet ubuntu-child} spec.containers{test} Normal BackOff Back-off pulling image "123.456.789.0:9595/test"
7s 7s 1 {kubelet ubuntu-child} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "test" with ImagePullBackOff: "Back-off pulling image \"123.456.789.0:9595/test\""
Del esclavo y el maestro, podría extraer el repositorio privado. Pero, el problema existe cuando kubectl intenta extraer la imagen del repositorio privado, aunque agregué mi secreto en la definición del pod.
Hubo un problema debido al número de puerto. Después de poner el número de puerto, ha comenzado a funcionar como se esperaba.
kubectl create secret docker-registry my-secret --docker-server=123.456.789.0:9595 --docker-username=admin --docker-password=XXXX [email protected]
No fue un error real, pero para ver la solución, consulte http://stackoverflow.com/questions/42267164/kubectl-not-able-to-pull-the-image-from-private-repository
Comentario más útil
Hubo un problema debido al número de puerto. Después de poner el número de puerto, ha comenzado a funcionar como se esperaba.
kubectl create secret docker-registry my-secret --docker-server=123.456.789.0:9595 --docker-username=admin --docker-password=XXXX [email protected]