{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20786","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20786/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20786/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20786/events","html_url":"https://github.com/kubernetes/kubernetes/issues/20786","id":131960388,"number":20786,"title":"External docker registry, can't pull images","user":{"login":"AdiuvoDotFr","id":4852352,"avatar_url":"https://avatars.githubusercontent.com/u/4852352?v=3","gravatar_id":"","url":"https://api.github.com/users/AdiuvoDotFr","html_url":"https://github.com/AdiuvoDotFr","followers_url":"https://api.github.com/users/AdiuvoDotFr/followers","following_url":"https://api.github.com/users/AdiuvoDotFr/following{/other_user}","gists_url":"https://api.github.com/users/AdiuvoDotFr/gists{/gist_id}","starred_url":"https://api.github.com/users/AdiuvoDotFr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdiuvoDotFr/subscriptions","organizations_url":"https://api.github.com/users/AdiuvoDotFr/orgs","repos_url":"https://api.github.com/users/AdiuvoDotFr/repos","events_url":"https://api.github.com/users/AdiuvoDotFr/events{/privacy}","received_events_url":"https://api.github.com/users/AdiuvoDotFr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/none","name":"team/none","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-07T11:35:30Z","updated_at":"2016-05-13T16:49:37Z","closed_at":null,"body":"Hello everyone, I'm trying since a while to pull images from my external private docker registry, and I don't understand why it doesn't work.\r\n\r\nI've read a lot a things around the web and almost tested everything I've found, without any success.\r\n\r\nFinally, here I am to ask for some help...\r\n\r\nMy private registry is a v2 version, so I use .docker/config.json files instead of .dockercfg\r\nI've tryed to types of config.json: one with auth and one without.\r\n\r\n```json\r\n{\"auths\":{\"https://my-private-registry.fr:5000\":{\"auth\":\"XXXXX\",\"email\":\"my@mail.fr\"}}}\r\n{\"https://my-private-registry.fr:5000\":{\"auth\":\"XXXXX\",\"email\":\"my@mail.fr\"}}\r\n```\r\n\r\nI've created a secret.yaml file, and then create the secret:\r\n\r\n```yaml\r\napiVersion: v1\r\nkind: Secret\r\nmetadata:\r\n  name: my-registry-key\r\ndata:\r\n  .dockerconfigjson: BASE64XXXXXXXXXXXXXXXXXXXXX\r\ntype: kubernetes.io/dockerconfigjson\r\n```\r\n\r\nAnd finally I use this yaml file to test if I can pull or not the image:\r\n\r\n```yaml\r\napiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: apache-example\r\nspec:\r\n  containers:\r\n    - name: apache-example\r\n      image: \"my-private-registry.fr:5000/apache_test:latest\"\r\n  imagePullSecrets:\r\n    - name: my-registry-key\r\n```\r\n\r\nI must precise that I can manually pull the images from all nodes, since I have the same config.json files in all of them.\r\n\r\nEverytime that I try to create my pod, I get this error:\r\n\r\n`Failed to pull image \"my-private-registry.fr:5000/apache_test:latest\" from pod \"apache-example_default\" and container \"apache-example\": Error: image apache_test:latest not found`\r\n\r\nWhat am I doing wrong? \r\n\r\nThank you all in advance for your help"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/219098022","html_url":"https://github.com/kubernetes/kubernetes/issues/20786#issuecomment-219098022","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20786","id":219098022,"user":{"login":"AdiuvoDotFr","id":4852352,"avatar_url":"https://avatars.githubusercontent.com/u/4852352?v=3","gravatar_id":"","url":"https://api.github.com/users/AdiuvoDotFr","html_url":"https://github.com/AdiuvoDotFr","followers_url":"https://api.github.com/users/AdiuvoDotFr/followers","following_url":"https://api.github.com/users/AdiuvoDotFr/following{/other_user}","gists_url":"https://api.github.com/users/AdiuvoDotFr/gists{/gist_id}","starred_url":"https://api.github.com/users/AdiuvoDotFr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdiuvoDotFr/subscriptions","organizations_url":"https://api.github.com/users/AdiuvoDotFr/orgs","repos_url":"https://api.github.com/users/AdiuvoDotFr/repos","events_url":"https://api.github.com/users/AdiuvoDotFr/events{/privacy}","received_events_url":"https://api.github.com/users/AdiuvoDotFr/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T16:49:37Z","updated_at":"2016-05-13T16:49:37Z","body":"Sorry, that's been a long time since I haven't look at this subject. \r\n\r\nI finally have bypassed this issue by deactivating authentication on my private registry, and restrict access to my lan only. If one day i wan't to have an access to it from outside, I will eventually add an http login to my reverse proxy.\r\n\r\nThis is not the best solution, but it does the job for me."}}