unable to pull images in kubernetes from private registry
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
i have setup a private registry in docker accessible thru a domain âÂÂmakdom.ddns.netâÂÂ, i can login push and pull images locally, no problem even from slave kubes node i can do this thing,
but when i write a kubes deployment file, it is unable to pull images from the private registry and fails.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ssh-deployment
spec:
template:
metadata:
labels:
app: helloworld
spec:
containers:
- name: ssh-demo
image: makdom.ddns.net/my-ubuntu
imagePullPolicy: IfNotPresent
ports:
- name: nodejs-port
containerPort: 22
imagePullSecrets:
- name: myregistrykey
secrets:
DOCKER_REGISTRY_SERVER="https://makdom.ddns.net/v1/"
DOCKER_USER="user"
DOCKER_PASSWORD="password"
DOCKER_EMAIL="email@example.com"
kubectl create secret docker-registry myregistrykey
--docker-server=$DOCKER_REGISTRY_SERVER
--docker-username=$DOCKER_USER
--docker-password=$DOCKER_PASSWORD
--docker-email=$DOCKER_EMAIL
error:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned ssh-deployment-7b7c7bf977-m6stk to kubes-slave
Normal SuccessfulMountVolume 1m kubelet, kubes-slave MountVolume.SetUp succeeded for volume "default-token-mx7qq"
Normal Pulled 1m (x3 over 1m) kubelet, kubes-slave Container image "makdom.ddns.net/my-ubuntu" already present on machine
Normal Created 1m (x3 over 1m) kubelet, kubes-slave Created container
Normal Started 1m (x3 over 1m) kubelet, kubes-slave Started container
Normal Pulling 34s (x2 over 1m) kubelet, kubes-slave pulling image "makdom.ddns.net/my-ubuntu"
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Failed to pull image "makdom.ddns.net/my-ubuntu": rpc error: code = Unknown desc = Error: image my-ubuntu:latest not found
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Error: ErrImagePull
Warning BackOff 19s (x6 over 1m) kubelet, kubes-slave Back-off restarting failed container
docker kubernetes
add a comment |Â
up vote
1
down vote
favorite
i have setup a private registry in docker accessible thru a domain âÂÂmakdom.ddns.netâÂÂ, i can login push and pull images locally, no problem even from slave kubes node i can do this thing,
but when i write a kubes deployment file, it is unable to pull images from the private registry and fails.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ssh-deployment
spec:
template:
metadata:
labels:
app: helloworld
spec:
containers:
- name: ssh-demo
image: makdom.ddns.net/my-ubuntu
imagePullPolicy: IfNotPresent
ports:
- name: nodejs-port
containerPort: 22
imagePullSecrets:
- name: myregistrykey
secrets:
DOCKER_REGISTRY_SERVER="https://makdom.ddns.net/v1/"
DOCKER_USER="user"
DOCKER_PASSWORD="password"
DOCKER_EMAIL="email@example.com"
kubectl create secret docker-registry myregistrykey
--docker-server=$DOCKER_REGISTRY_SERVER
--docker-username=$DOCKER_USER
--docker-password=$DOCKER_PASSWORD
--docker-email=$DOCKER_EMAIL
error:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned ssh-deployment-7b7c7bf977-m6stk to kubes-slave
Normal SuccessfulMountVolume 1m kubelet, kubes-slave MountVolume.SetUp succeeded for volume "default-token-mx7qq"
Normal Pulled 1m (x3 over 1m) kubelet, kubes-slave Container image "makdom.ddns.net/my-ubuntu" already present on machine
Normal Created 1m (x3 over 1m) kubelet, kubes-slave Created container
Normal Started 1m (x3 over 1m) kubelet, kubes-slave Started container
Normal Pulling 34s (x2 over 1m) kubelet, kubes-slave pulling image "makdom.ddns.net/my-ubuntu"
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Failed to pull image "makdom.ddns.net/my-ubuntu": rpc error: code = Unknown desc = Error: image my-ubuntu:latest not found
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Error: ErrImagePull
Warning BackOff 19s (x6 over 1m) kubelet, kubes-slave Back-off restarting failed container
docker kubernetes
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
i have setup a private registry in docker accessible thru a domain âÂÂmakdom.ddns.netâÂÂ, i can login push and pull images locally, no problem even from slave kubes node i can do this thing,
but when i write a kubes deployment file, it is unable to pull images from the private registry and fails.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ssh-deployment
spec:
template:
metadata:
labels:
app: helloworld
spec:
containers:
- name: ssh-demo
image: makdom.ddns.net/my-ubuntu
imagePullPolicy: IfNotPresent
ports:
- name: nodejs-port
containerPort: 22
imagePullSecrets:
- name: myregistrykey
secrets:
DOCKER_REGISTRY_SERVER="https://makdom.ddns.net/v1/"
DOCKER_USER="user"
DOCKER_PASSWORD="password"
DOCKER_EMAIL="email@example.com"
kubectl create secret docker-registry myregistrykey
--docker-server=$DOCKER_REGISTRY_SERVER
--docker-username=$DOCKER_USER
--docker-password=$DOCKER_PASSWORD
--docker-email=$DOCKER_EMAIL
error:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned ssh-deployment-7b7c7bf977-m6stk to kubes-slave
Normal SuccessfulMountVolume 1m kubelet, kubes-slave MountVolume.SetUp succeeded for volume "default-token-mx7qq"
Normal Pulled 1m (x3 over 1m) kubelet, kubes-slave Container image "makdom.ddns.net/my-ubuntu" already present on machine
Normal Created 1m (x3 over 1m) kubelet, kubes-slave Created container
Normal Started 1m (x3 over 1m) kubelet, kubes-slave Started container
Normal Pulling 34s (x2 over 1m) kubelet, kubes-slave pulling image "makdom.ddns.net/my-ubuntu"
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Failed to pull image "makdom.ddns.net/my-ubuntu": rpc error: code = Unknown desc = Error: image my-ubuntu:latest not found
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Error: ErrImagePull
Warning BackOff 19s (x6 over 1m) kubelet, kubes-slave Back-off restarting failed container
docker kubernetes
i have setup a private registry in docker accessible thru a domain âÂÂmakdom.ddns.netâÂÂ, i can login push and pull images locally, no problem even from slave kubes node i can do this thing,
but when i write a kubes deployment file, it is unable to pull images from the private registry and fails.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ssh-deployment
spec:
template:
metadata:
labels:
app: helloworld
spec:
containers:
- name: ssh-demo
image: makdom.ddns.net/my-ubuntu
imagePullPolicy: IfNotPresent
ports:
- name: nodejs-port
containerPort: 22
imagePullSecrets:
- name: myregistrykey
secrets:
DOCKER_REGISTRY_SERVER="https://makdom.ddns.net/v1/"
DOCKER_USER="user"
DOCKER_PASSWORD="password"
DOCKER_EMAIL="email@example.com"
kubectl create secret docker-registry myregistrykey
--docker-server=$DOCKER_REGISTRY_SERVER
--docker-username=$DOCKER_USER
--docker-password=$DOCKER_PASSWORD
--docker-email=$DOCKER_EMAIL
error:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned ssh-deployment-7b7c7bf977-m6stk to kubes-slave
Normal SuccessfulMountVolume 1m kubelet, kubes-slave MountVolume.SetUp succeeded for volume "default-token-mx7qq"
Normal Pulled 1m (x3 over 1m) kubelet, kubes-slave Container image "makdom.ddns.net/my-ubuntu" already present on machine
Normal Created 1m (x3 over 1m) kubelet, kubes-slave Created container
Normal Started 1m (x3 over 1m) kubelet, kubes-slave Started container
Normal Pulling 34s (x2 over 1m) kubelet, kubes-slave pulling image "makdom.ddns.net/my-ubuntu"
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Failed to pull image "makdom.ddns.net/my-ubuntu": rpc error: code = Unknown desc = Error: image my-ubuntu:latest not found
Warning Failed 34s (x2 over 1m) kubelet, kubes-slave Error: ErrImagePull
Warning BackOff 19s (x6 over 1m) kubelet, kubes-slave Back-off restarting failed container
docker kubernetes
asked Dec 23 '17 at 14:21
Mohd
146114
146114
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Known issue https://github.com/kubernetes/kubernetes/issues/57427, resolved in master in https://github.com/kubernetes/kubernetes/pull/57463
Targeted fix for 1.9.1 in https://github.com/kubernetes/kubernetes/pull/57472
Workarounds until then:
If you have a .dockerconfigjson for your private registry already, you can manually specify the type and data key:
kubectl create secret generic my-secret-name
--type=kubernetes.io/dockerconfigjson
--from-file .dockerconfigjson=/path/to/.dockerconfigjson
If you don't have a .dockerconfigjson file already, you can fix up the secret produced by kubectl create secret docker-registry
manually:
- add
--dry-run -o yaml > secret.yaml
- change the type from
kubernetes.io/dockercfg
tokubernetes.io/dockercfgjson
- change the data key from
.dockercfg
to.dockercfgjson
- create the modified secret with
kubectl create -f secret.yaml
ok how can i fix this, as im a little lost!
â Mohd
Dec 24 '17 at 3:20
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Known issue https://github.com/kubernetes/kubernetes/issues/57427, resolved in master in https://github.com/kubernetes/kubernetes/pull/57463
Targeted fix for 1.9.1 in https://github.com/kubernetes/kubernetes/pull/57472
Workarounds until then:
If you have a .dockerconfigjson for your private registry already, you can manually specify the type and data key:
kubectl create secret generic my-secret-name
--type=kubernetes.io/dockerconfigjson
--from-file .dockerconfigjson=/path/to/.dockerconfigjson
If you don't have a .dockerconfigjson file already, you can fix up the secret produced by kubectl create secret docker-registry
manually:
- add
--dry-run -o yaml > secret.yaml
- change the type from
kubernetes.io/dockercfg
tokubernetes.io/dockercfgjson
- change the data key from
.dockercfg
to.dockercfgjson
- create the modified secret with
kubectl create -f secret.yaml
ok how can i fix this, as im a little lost!
â Mohd
Dec 24 '17 at 3:20
add a comment |Â
up vote
1
down vote
accepted
Known issue https://github.com/kubernetes/kubernetes/issues/57427, resolved in master in https://github.com/kubernetes/kubernetes/pull/57463
Targeted fix for 1.9.1 in https://github.com/kubernetes/kubernetes/pull/57472
Workarounds until then:
If you have a .dockerconfigjson for your private registry already, you can manually specify the type and data key:
kubectl create secret generic my-secret-name
--type=kubernetes.io/dockerconfigjson
--from-file .dockerconfigjson=/path/to/.dockerconfigjson
If you don't have a .dockerconfigjson file already, you can fix up the secret produced by kubectl create secret docker-registry
manually:
- add
--dry-run -o yaml > secret.yaml
- change the type from
kubernetes.io/dockercfg
tokubernetes.io/dockercfgjson
- change the data key from
.dockercfg
to.dockercfgjson
- create the modified secret with
kubectl create -f secret.yaml
ok how can i fix this, as im a little lost!
â Mohd
Dec 24 '17 at 3:20
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Known issue https://github.com/kubernetes/kubernetes/issues/57427, resolved in master in https://github.com/kubernetes/kubernetes/pull/57463
Targeted fix for 1.9.1 in https://github.com/kubernetes/kubernetes/pull/57472
Workarounds until then:
If you have a .dockerconfigjson for your private registry already, you can manually specify the type and data key:
kubectl create secret generic my-secret-name
--type=kubernetes.io/dockerconfigjson
--from-file .dockerconfigjson=/path/to/.dockerconfigjson
If you don't have a .dockerconfigjson file already, you can fix up the secret produced by kubectl create secret docker-registry
manually:
- add
--dry-run -o yaml > secret.yaml
- change the type from
kubernetes.io/dockercfg
tokubernetes.io/dockercfgjson
- change the data key from
.dockercfg
to.dockercfgjson
- create the modified secret with
kubectl create -f secret.yaml
Known issue https://github.com/kubernetes/kubernetes/issues/57427, resolved in master in https://github.com/kubernetes/kubernetes/pull/57463
Targeted fix for 1.9.1 in https://github.com/kubernetes/kubernetes/pull/57472
Workarounds until then:
If you have a .dockerconfigjson for your private registry already, you can manually specify the type and data key:
kubectl create secret generic my-secret-name
--type=kubernetes.io/dockerconfigjson
--from-file .dockerconfigjson=/path/to/.dockerconfigjson
If you don't have a .dockerconfigjson file already, you can fix up the secret produced by kubectl create secret docker-registry
manually:
- add
--dry-run -o yaml > secret.yaml
- change the type from
kubernetes.io/dockercfg
tokubernetes.io/dockercfgjson
- change the data key from
.dockercfg
to.dockercfgjson
- create the modified secret with
kubectl create -f secret.yaml
edited Dec 24 '17 at 4:55
answered Dec 23 '17 at 21:05
Jordan Liggitt
1263
1263
ok how can i fix this, as im a little lost!
â Mohd
Dec 24 '17 at 3:20
add a comment |Â
ok how can i fix this, as im a little lost!
â Mohd
Dec 24 '17 at 3:20
ok how can i fix this, as im a little lost!
â Mohd
Dec 24 '17 at 3:20
ok how can i fix this, as im a little lost!
â Mohd
Dec 24 '17 at 3:20
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412678%2funable-to-pull-images-in-kubernetes-from-private-registry%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password