2017-03-20 22:35:51 +00:00
---
2018-02-27 18:51:46 +00:00
reviewers:
2017-03-20 22:35:51 +00:00
- erictune
- thockin
title: Images
2018-05-05 16:00:51 +00:00
content_template: templates/concept
2018-06-06 23:51:26 +00:00
weight: 10
2017-03-20 22:35:51 +00:00
---
2018-05-05 16:00:51 +00:00
{{% capture overview %}}
2017-03-20 22:35:51 +00:00
You create your Docker image and push it to a registry before referring to it in a Kubernetes pod.
The `image` property of a container supports the same syntax as the `docker` command does, including private registries and tags.
2018-05-05 16:00:51 +00:00
{{% /capture %}}
2017-04-25 17:36:59 +00:00
2017-03-20 22:35:51 +00:00
2018-05-05 16:00:51 +00:00
{{% capture body %}}
2017-03-20 22:35:51 +00:00
## Updating Images
2017-09-12 06:20:07 +00:00
The default pull policy is `IfNotPresent` which causes the Kubelet to skip
pulling an image if it already exists. If you would like to always force a pull,
you can do one of the following:
2018-09-21 14:43:29 +00:00
- set the `imagePullPolicy` of the container to `Always` .
- omit the `imagePullPolicy` and use `:latest` as the tag for the image to use.
- omit the `imagePullPolicy` and the tag for the image to use.
2018-07-18 22:54:21 +00:00
- enable the [AlwaysPullImages ](/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages ) admission controller.
2017-03-20 22:35:51 +00:00
Note that you should avoid using `:latest` tag, see [Best Practices for Configuration ](/docs/concepts/configuration/overview/#container-images ) for more information.
[Do Not Merge] Release 1.12 (#10292)
* Update docs for fields allowed at root of CRD schema (#9973)
* add plugin docs and examples (#10053)
* docs update to promote TaintNodesByCondition to beta (#9626)
* HPA Specificity Improvements (#8757)
Updated the HPA docs to reference the `autoscaling/v2beta2` API version,
and added documentation about the new fields.
* adjust docs for pod ready++ (#10049)
* Remove --cadvisor-port - has been deprecated since v1.10 (#10023)
Change-Id: Id2a685473a243aef492a98ff450759f39e362557
* Add Documentation for Snapshot Feature (#9948)
* Add documentation for snapshot feature
* Update volume-snapshots.md
* Add dry-run to api-concepts (#10033)
* kubeadm-init: Update the offline support section (#10062)
The update includes the following things (in mind with Kubernetes 1.12):
- Remove the 1.8 image versions
- Add the 1.10 image versions that were missing until now
- Include a comment for the missing arch suffixes in 1.12
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
* Say bye to `DynamicProvisioningScheduling` (#10157)
The mentioned feature gate is now collapsed into `VolumeScheduling`.
xref: kubernetes/kubernetes#67432
* Update ResourceQuota per PriorityClass state for 1.12 (#10229)
* TokenRequest and TokenRequestProjection now beta (#10161)
xref: kubernetes/kubernetes#67349
* Change feature state for kms provider to beta. (#10230)
KMS Provider will be graduating to beta in v1.12, reflecting this change on the website.
* coredns default (#10200)
* Promote ShareProcessNamespace to beta in docs (#9996)
* Add CoreDNS details to DNS Debug docs (#10201)
* add coredns details
* address nits, add query logging section
* Update docs with topology aware dynamic provisioning (#9939)
* Document topology aware volume binding feature
* update for readability
* Update storage-classes.md
* comma splice
* don't abbreviate
* HPA Algorithm Information Improvements (#9780)
* Update HPA docs with more algorithm details
The HPA docs pointed to an out-of-date document for information on the
algorithm details, which users were finding confusing. This sticks a
section on the algorithm in the HPA docs instead, documenting both
general behavior and corner cases.
* Add glossary info, HPA docs on quantities
People often ask about the quantity notation when working with the
metrics APIs, so this adds a glossary entry on quantities (since they're
used elsewhere in the system), and a short explantation in the HPA walkthough.
* Information about HPA readiness and stabilization
This adds information about the new changes to HPA readiness and
stabilization from kubernetes/features#591, and other minor changes that
landed in Kubernetes 1.12.
* Update horizontal-pod-autoscale.md
* Audit 1.12 doc (#9953)
* audit 1.12 document
* remove legacy audit feature
https://github.com/kubernetes/kubernetes/pull/65862
* update feature gate doc
* MountPropagation is now GA (#10090)
* RuntimeClass documentation (#10102)
* RuntimeClass documentation
* Update runtime-class.md
* Add documentation for Scheduler performance tuning (#10048)
* Add documentation for Scheduler performance tuning
* Update scheduler-perf-tuning.md
* TTL controller for cleaning up finished resources (#10064)
* TTL controller for cleaning up finished resources
* Address comments
* Update ttlafterfinished.md
* Bump quota configuration api version (#10217)
* Incremental update from master (#10278)
* fix invalid href of cloud controller manager (#10240)
* fix invalid yaml format (#10238)
* update storage-limits doc with Azure disk part (#10224)
update storage-limits doc with Azure disk part
fix comments
* Update kubelet-config-file.md (#10222)
Update link to KubeletConfiguration struct.
* fix a trivial misspelling (#10244)
* Fix cassandra-statefulset.yaml indent level (#10243)
* Mention minimum etcd versions (#10208)
Source: https://groups.google.com/d/msg/kubernetes-dev/jMPA4JzKiY4/HIx2ugvLBAAJ
* fix 404 error (#10250)
* Small verb tweak (#10190)
Present participle, ftw.
* Add AnchorJS logic for header links (#10155)
* Add AnchorJS JavaScript
* Remove existing inpage_heading logic
* Remove underline from anchor tags
* Use single icon and add touch visibility
* Use paragraph link icon for AnchorJS
* Update Sass to use code formatting in docsContent headers
* Update header size coverage to H3-H6
* fix broken link in kubefed.md (#10254)
* Update the version numbers for the X-Remote-Extra- and Impersonate-Extra- key fixes (#9827)
The fix was cherry picked into 1.11.3, 1.10.7, and 1.9.11:
https://github.com/kubernetes/kubernetes/pull/67162
https://github.com/kubernetes/kubernetes/pull/67163
https://github.com/kubernetes/kubernetes/pull/67164
* fix typo (#10168)
* fix typo
* addressing comments.
* Update setup-ha-etcd-with-kubeadm.md
* fix typos (#10252)
* fix description of contribute guide (#10253)
* describe truncate feature about advanced audit (#10236)
* describe truncate feature about advanced audit
* Update audit.md
* docs update to promote ScheduleDaemonSetPods to beta (#9923)
* Dynamic volume limit updates for 1.12 (#10211)
* add a placeholder commit
* Update docs for csi volume limits
* Update storage-limits.md
* Add "MayRunAs" value among other GroupStrategies (#9888)
* Add CoreDNS details to the customize DNS doc (#10228)
* Add CoreDNS details to the customize DNS doc
Rewrite the document to include more details about CoreDNS, since it's now the default from v1.12
* Address comments
* Improve doc wording
* Fix link
* Update dns-custom-nameservers.md
* Update dns-custom-nameservers.md
* Fix secrets docs in 1.12 branch (#10056)
* Fix secrets docs
* Update secret.md
* Revert CoreDNS Docs (#10319)
* Revert "Add CoreDNS details to DNS Debug docs (#10201)"
This reverts commit 462817a67479fcc3481648981a4b90df35b86fdc.
* Revert "Add CoreDNS details to the customize DNS doc (#10228)"
This reverts commit e7319eeb8cde914d06cad039867e6213ecef1001.
* Revert "coredns default (#10200)"
This reverts commit 698e93b4415600d1a67f117132d8b09713282aa4.
* Add CRI installation instructions page
Added cri-installation page with CRI installation instructions
Referenced it from kubeadm-init and install-kubeadm pages.
* kubeadm: update API types documentation for 1.12 (#10283)
v1alpha2 -> v1alpha3
MasterConfiguration -> [new-api-types]
* TokenRequest feature documentation (#10295)
* AdvancedAuditing is now GA (#10156)
xref: kubernetes/kubernetes#65862
`AdvancedAuditing` feature is GA in 1.12. This PR adjusts the related
docs.
* update runtime-class.md (#10332)
* update runtime-class.md
* Update runtime-class.md
* Document cross-authorizer permissions for creating RBAC roles (#10015)
* Document cross-authorizer permissions for creating RBAC roles
* Update rbac.md
* kubeadm: update authored content for 1.12 (reference docs and cluster creation) (#10348)
* kubeadm: update authored content in reference docs for 1.12
* kubeadm: add time frame in create-cluster-kubeadm for 1.12
* add AllowedProcMountTypes and ProcMountType to docs (#9911)
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
* kubeadm: add new command line reference (#10306)
Add:
- placeholder files
- include place holder files
- include "renew" sub command
- add missing tabs for "alpha phase kubelet"
* Documenting SCTP support in Kubernetes (#10279)
* Documenting SCTP support in Kubernetes Service, Endpoint, NetworkPolicy and Pod
* Updates based on comments on the PR
* kubectl expose update with SCTP support
* Updated according to comments in the PR
* Revert "kubectl expose update with SCTP support"
This reverts commit 0d5a1e6720a012390cf100c83e16b4a8c0782356.
* TLS Bootstrap and Server Cert Rotation feature documentation (#10232)
* TokenRequest feature documentation
* line wrapping to make review not insane
* update content for GA without major refactor
* Update kubelet-tls-bootstrapping.md
* Add clarifications for volume snapshots (#10296)
* Update kubadm ha installation for 1.12 (#10264)
* Update kubadm ha installation for 1.12
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* update stable version
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Update stacked control plane for v1.12 (#2)
* use v1alpha3
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* more v1alpha3 (#4)
* updates
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Document how to run in-tree cloud providers with kubeadm (#10357)
Change-Id: Iab6b996a830503d74a6eb0c507c5f8ca7a39235b
* kubeadm reference doc for release 1.12 (#10359)
* Revert "Revert "Add CoreDNS details to DNS Debug docs (#10201)""
This reverts commit bb30f4d1fcd6fba2fe6190778ead99f8010033b7.
* Revert "Revert "Add CoreDNS details to the customize DNS doc (#10228)""
This reverts commit bc23d45c09d7b83cac130fe22a0bd91e72435862.
* Revert "Revert "coredns default (#10200)""
This reverts commit 7f4350d6ab7fc554ee53126d3875e845d2e43d1f.
* add missing instruction for ha guide (#10374)
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* kubeadm - Ha upgrade updates (#10340)
* Update HA upgrade docs
* Adds external etcd HA upgrade guide
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* copyedit
* more edits
* add runasgroup in psp (#10076)
* update KubeletPluginsWatcher feature gate (#10205)
* generated 1.12 docs
* Building Multi-arch images with Manifests (#10379)
In 1.12, a variety of images used in a typical kubernetes installation
have started to using manifests to better support environments with arm
or ppc64le architectures. For example all images used with kubeadm by
default have manifests, another would be all the tests in the
conformance test suite. Here we capture the best practices for everyone
to start using manifests in their own workflows.
Change-Id: I5ba4c5fe55ffc9486a8251760f3352be4f2e1494
* Upgrade docs for v1.12 (#10344)
* generated assets and docs
* remove 1.7
* update 1.12
* update plugin documentation under docs>tasks>extend-kubectl (#10259)
* update plugin documentation under docs>tasks>extend-kubectl
* Update kubectl-plugins.md
2018-09-27 23:41:39 +00:00
## Building Multi-architecture Images with Manifests
Docker CLI now supports the following command `docker manifest` with sub commands like `create` , `annotate` and `push` . These commands can be used to build and push the manifests. You can use `docker manifest inspect` to view the manifest.
Please see docker documentation here:
https://docs.docker.com/edge/engine/reference/commandline/manifest/
See examples on how we use this in our build harness:
https://cs.k8s.io/?q=docker%20manifest%20(create%7Cpush%7Cannotate)& i=nope& files=& repos=
These commands rely on and are implemented purely on the Docker CLI. You will need to either edit the `$HOME/.docker/config.json` and set `experimental` key to `enabled` or you can just set `DOCKER_CLI_EXPERIMENTAL` environment variable to `enabled` when you call the CLI commands.
{{< note > }}
2018-11-06 19:33:04 +00:00
Please use Docker *18.06 or above* , versions below that either have bugs or do not support the experimental command line option. Example https://github.com/docker/cli/issues/1135 causes problems under containerd.
[Do Not Merge] Release 1.12 (#10292)
* Update docs for fields allowed at root of CRD schema (#9973)
* add plugin docs and examples (#10053)
* docs update to promote TaintNodesByCondition to beta (#9626)
* HPA Specificity Improvements (#8757)
Updated the HPA docs to reference the `autoscaling/v2beta2` API version,
and added documentation about the new fields.
* adjust docs for pod ready++ (#10049)
* Remove --cadvisor-port - has been deprecated since v1.10 (#10023)
Change-Id: Id2a685473a243aef492a98ff450759f39e362557
* Add Documentation for Snapshot Feature (#9948)
* Add documentation for snapshot feature
* Update volume-snapshots.md
* Add dry-run to api-concepts (#10033)
* kubeadm-init: Update the offline support section (#10062)
The update includes the following things (in mind with Kubernetes 1.12):
- Remove the 1.8 image versions
- Add the 1.10 image versions that were missing until now
- Include a comment for the missing arch suffixes in 1.12
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
* Say bye to `DynamicProvisioningScheduling` (#10157)
The mentioned feature gate is now collapsed into `VolumeScheduling`.
xref: kubernetes/kubernetes#67432
* Update ResourceQuota per PriorityClass state for 1.12 (#10229)
* TokenRequest and TokenRequestProjection now beta (#10161)
xref: kubernetes/kubernetes#67349
* Change feature state for kms provider to beta. (#10230)
KMS Provider will be graduating to beta in v1.12, reflecting this change on the website.
* coredns default (#10200)
* Promote ShareProcessNamespace to beta in docs (#9996)
* Add CoreDNS details to DNS Debug docs (#10201)
* add coredns details
* address nits, add query logging section
* Update docs with topology aware dynamic provisioning (#9939)
* Document topology aware volume binding feature
* update for readability
* Update storage-classes.md
* comma splice
* don't abbreviate
* HPA Algorithm Information Improvements (#9780)
* Update HPA docs with more algorithm details
The HPA docs pointed to an out-of-date document for information on the
algorithm details, which users were finding confusing. This sticks a
section on the algorithm in the HPA docs instead, documenting both
general behavior and corner cases.
* Add glossary info, HPA docs on quantities
People often ask about the quantity notation when working with the
metrics APIs, so this adds a glossary entry on quantities (since they're
used elsewhere in the system), and a short explantation in the HPA walkthough.
* Information about HPA readiness and stabilization
This adds information about the new changes to HPA readiness and
stabilization from kubernetes/features#591, and other minor changes that
landed in Kubernetes 1.12.
* Update horizontal-pod-autoscale.md
* Audit 1.12 doc (#9953)
* audit 1.12 document
* remove legacy audit feature
https://github.com/kubernetes/kubernetes/pull/65862
* update feature gate doc
* MountPropagation is now GA (#10090)
* RuntimeClass documentation (#10102)
* RuntimeClass documentation
* Update runtime-class.md
* Add documentation for Scheduler performance tuning (#10048)
* Add documentation for Scheduler performance tuning
* Update scheduler-perf-tuning.md
* TTL controller for cleaning up finished resources (#10064)
* TTL controller for cleaning up finished resources
* Address comments
* Update ttlafterfinished.md
* Bump quota configuration api version (#10217)
* Incremental update from master (#10278)
* fix invalid href of cloud controller manager (#10240)
* fix invalid yaml format (#10238)
* update storage-limits doc with Azure disk part (#10224)
update storage-limits doc with Azure disk part
fix comments
* Update kubelet-config-file.md (#10222)
Update link to KubeletConfiguration struct.
* fix a trivial misspelling (#10244)
* Fix cassandra-statefulset.yaml indent level (#10243)
* Mention minimum etcd versions (#10208)
Source: https://groups.google.com/d/msg/kubernetes-dev/jMPA4JzKiY4/HIx2ugvLBAAJ
* fix 404 error (#10250)
* Small verb tweak (#10190)
Present participle, ftw.
* Add AnchorJS logic for header links (#10155)
* Add AnchorJS JavaScript
* Remove existing inpage_heading logic
* Remove underline from anchor tags
* Use single icon and add touch visibility
* Use paragraph link icon for AnchorJS
* Update Sass to use code formatting in docsContent headers
* Update header size coverage to H3-H6
* fix broken link in kubefed.md (#10254)
* Update the version numbers for the X-Remote-Extra- and Impersonate-Extra- key fixes (#9827)
The fix was cherry picked into 1.11.3, 1.10.7, and 1.9.11:
https://github.com/kubernetes/kubernetes/pull/67162
https://github.com/kubernetes/kubernetes/pull/67163
https://github.com/kubernetes/kubernetes/pull/67164
* fix typo (#10168)
* fix typo
* addressing comments.
* Update setup-ha-etcd-with-kubeadm.md
* fix typos (#10252)
* fix description of contribute guide (#10253)
* describe truncate feature about advanced audit (#10236)
* describe truncate feature about advanced audit
* Update audit.md
* docs update to promote ScheduleDaemonSetPods to beta (#9923)
* Dynamic volume limit updates for 1.12 (#10211)
* add a placeholder commit
* Update docs for csi volume limits
* Update storage-limits.md
* Add "MayRunAs" value among other GroupStrategies (#9888)
* Add CoreDNS details to the customize DNS doc (#10228)
* Add CoreDNS details to the customize DNS doc
Rewrite the document to include more details about CoreDNS, since it's now the default from v1.12
* Address comments
* Improve doc wording
* Fix link
* Update dns-custom-nameservers.md
* Update dns-custom-nameservers.md
* Fix secrets docs in 1.12 branch (#10056)
* Fix secrets docs
* Update secret.md
* Revert CoreDNS Docs (#10319)
* Revert "Add CoreDNS details to DNS Debug docs (#10201)"
This reverts commit 462817a67479fcc3481648981a4b90df35b86fdc.
* Revert "Add CoreDNS details to the customize DNS doc (#10228)"
This reverts commit e7319eeb8cde914d06cad039867e6213ecef1001.
* Revert "coredns default (#10200)"
This reverts commit 698e93b4415600d1a67f117132d8b09713282aa4.
* Add CRI installation instructions page
Added cri-installation page with CRI installation instructions
Referenced it from kubeadm-init and install-kubeadm pages.
* kubeadm: update API types documentation for 1.12 (#10283)
v1alpha2 -> v1alpha3
MasterConfiguration -> [new-api-types]
* TokenRequest feature documentation (#10295)
* AdvancedAuditing is now GA (#10156)
xref: kubernetes/kubernetes#65862
`AdvancedAuditing` feature is GA in 1.12. This PR adjusts the related
docs.
* update runtime-class.md (#10332)
* update runtime-class.md
* Update runtime-class.md
* Document cross-authorizer permissions for creating RBAC roles (#10015)
* Document cross-authorizer permissions for creating RBAC roles
* Update rbac.md
* kubeadm: update authored content for 1.12 (reference docs and cluster creation) (#10348)
* kubeadm: update authored content in reference docs for 1.12
* kubeadm: add time frame in create-cluster-kubeadm for 1.12
* add AllowedProcMountTypes and ProcMountType to docs (#9911)
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
* kubeadm: add new command line reference (#10306)
Add:
- placeholder files
- include place holder files
- include "renew" sub command
- add missing tabs for "alpha phase kubelet"
* Documenting SCTP support in Kubernetes (#10279)
* Documenting SCTP support in Kubernetes Service, Endpoint, NetworkPolicy and Pod
* Updates based on comments on the PR
* kubectl expose update with SCTP support
* Updated according to comments in the PR
* Revert "kubectl expose update with SCTP support"
This reverts commit 0d5a1e6720a012390cf100c83e16b4a8c0782356.
* TLS Bootstrap and Server Cert Rotation feature documentation (#10232)
* TokenRequest feature documentation
* line wrapping to make review not insane
* update content for GA without major refactor
* Update kubelet-tls-bootstrapping.md
* Add clarifications for volume snapshots (#10296)
* Update kubadm ha installation for 1.12 (#10264)
* Update kubadm ha installation for 1.12
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* update stable version
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Update stacked control plane for v1.12 (#2)
* use v1alpha3
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* more v1alpha3 (#4)
* updates
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Document how to run in-tree cloud providers with kubeadm (#10357)
Change-Id: Iab6b996a830503d74a6eb0c507c5f8ca7a39235b
* kubeadm reference doc for release 1.12 (#10359)
* Revert "Revert "Add CoreDNS details to DNS Debug docs (#10201)""
This reverts commit bb30f4d1fcd6fba2fe6190778ead99f8010033b7.
* Revert "Revert "Add CoreDNS details to the customize DNS doc (#10228)""
This reverts commit bc23d45c09d7b83cac130fe22a0bd91e72435862.
* Revert "Revert "coredns default (#10200)""
This reverts commit 7f4350d6ab7fc554ee53126d3875e845d2e43d1f.
* add missing instruction for ha guide (#10374)
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* kubeadm - Ha upgrade updates (#10340)
* Update HA upgrade docs
* Adds external etcd HA upgrade guide
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* copyedit
* more edits
* add runasgroup in psp (#10076)
* update KubeletPluginsWatcher feature gate (#10205)
* generated 1.12 docs
* Building Multi-arch images with Manifests (#10379)
In 1.12, a variety of images used in a typical kubernetes installation
have started to using manifests to better support environments with arm
or ppc64le architectures. For example all images used with kubeadm by
default have manifests, another would be all the tests in the
conformance test suite. Here we capture the best practices for everyone
to start using manifests in their own workflows.
Change-Id: I5ba4c5fe55ffc9486a8251760f3352be4f2e1494
* Upgrade docs for v1.12 (#10344)
* generated assets and docs
* remove 1.7
* update 1.12
* update plugin documentation under docs>tasks>extend-kubectl (#10259)
* update plugin documentation under docs>tasks>extend-kubectl
* Update kubectl-plugins.md
2018-09-27 23:41:39 +00:00
{{< / note > }}
If you run into trouble with uploading stale manifests, just clean up the older manifests in `$HOME/.docker/manifests` to start fresh.
2018-10-26 16:07:21 +00:00
For Kubernetes, we have typically used images with suffix `-$(ARCH)` . For backward compatibility, please generate the older images with suffixes. The idea is to generate say `pause` image which has the manifest for all the arch(es) and say `pause-amd64` which is backwards compatible for older configurations or YAML files which may have hard coded the images with suffixes.
[Do Not Merge] Release 1.12 (#10292)
* Update docs for fields allowed at root of CRD schema (#9973)
* add plugin docs and examples (#10053)
* docs update to promote TaintNodesByCondition to beta (#9626)
* HPA Specificity Improvements (#8757)
Updated the HPA docs to reference the `autoscaling/v2beta2` API version,
and added documentation about the new fields.
* adjust docs for pod ready++ (#10049)
* Remove --cadvisor-port - has been deprecated since v1.10 (#10023)
Change-Id: Id2a685473a243aef492a98ff450759f39e362557
* Add Documentation for Snapshot Feature (#9948)
* Add documentation for snapshot feature
* Update volume-snapshots.md
* Add dry-run to api-concepts (#10033)
* kubeadm-init: Update the offline support section (#10062)
The update includes the following things (in mind with Kubernetes 1.12):
- Remove the 1.8 image versions
- Add the 1.10 image versions that were missing until now
- Include a comment for the missing arch suffixes in 1.12
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
* Say bye to `DynamicProvisioningScheduling` (#10157)
The mentioned feature gate is now collapsed into `VolumeScheduling`.
xref: kubernetes/kubernetes#67432
* Update ResourceQuota per PriorityClass state for 1.12 (#10229)
* TokenRequest and TokenRequestProjection now beta (#10161)
xref: kubernetes/kubernetes#67349
* Change feature state for kms provider to beta. (#10230)
KMS Provider will be graduating to beta in v1.12, reflecting this change on the website.
* coredns default (#10200)
* Promote ShareProcessNamespace to beta in docs (#9996)
* Add CoreDNS details to DNS Debug docs (#10201)
* add coredns details
* address nits, add query logging section
* Update docs with topology aware dynamic provisioning (#9939)
* Document topology aware volume binding feature
* update for readability
* Update storage-classes.md
* comma splice
* don't abbreviate
* HPA Algorithm Information Improvements (#9780)
* Update HPA docs with more algorithm details
The HPA docs pointed to an out-of-date document for information on the
algorithm details, which users were finding confusing. This sticks a
section on the algorithm in the HPA docs instead, documenting both
general behavior and corner cases.
* Add glossary info, HPA docs on quantities
People often ask about the quantity notation when working with the
metrics APIs, so this adds a glossary entry on quantities (since they're
used elsewhere in the system), and a short explantation in the HPA walkthough.
* Information about HPA readiness and stabilization
This adds information about the new changes to HPA readiness and
stabilization from kubernetes/features#591, and other minor changes that
landed in Kubernetes 1.12.
* Update horizontal-pod-autoscale.md
* Audit 1.12 doc (#9953)
* audit 1.12 document
* remove legacy audit feature
https://github.com/kubernetes/kubernetes/pull/65862
* update feature gate doc
* MountPropagation is now GA (#10090)
* RuntimeClass documentation (#10102)
* RuntimeClass documentation
* Update runtime-class.md
* Add documentation for Scheduler performance tuning (#10048)
* Add documentation for Scheduler performance tuning
* Update scheduler-perf-tuning.md
* TTL controller for cleaning up finished resources (#10064)
* TTL controller for cleaning up finished resources
* Address comments
* Update ttlafterfinished.md
* Bump quota configuration api version (#10217)
* Incremental update from master (#10278)
* fix invalid href of cloud controller manager (#10240)
* fix invalid yaml format (#10238)
* update storage-limits doc with Azure disk part (#10224)
update storage-limits doc with Azure disk part
fix comments
* Update kubelet-config-file.md (#10222)
Update link to KubeletConfiguration struct.
* fix a trivial misspelling (#10244)
* Fix cassandra-statefulset.yaml indent level (#10243)
* Mention minimum etcd versions (#10208)
Source: https://groups.google.com/d/msg/kubernetes-dev/jMPA4JzKiY4/HIx2ugvLBAAJ
* fix 404 error (#10250)
* Small verb tweak (#10190)
Present participle, ftw.
* Add AnchorJS logic for header links (#10155)
* Add AnchorJS JavaScript
* Remove existing inpage_heading logic
* Remove underline from anchor tags
* Use single icon and add touch visibility
* Use paragraph link icon for AnchorJS
* Update Sass to use code formatting in docsContent headers
* Update header size coverage to H3-H6
* fix broken link in kubefed.md (#10254)
* Update the version numbers for the X-Remote-Extra- and Impersonate-Extra- key fixes (#9827)
The fix was cherry picked into 1.11.3, 1.10.7, and 1.9.11:
https://github.com/kubernetes/kubernetes/pull/67162
https://github.com/kubernetes/kubernetes/pull/67163
https://github.com/kubernetes/kubernetes/pull/67164
* fix typo (#10168)
* fix typo
* addressing comments.
* Update setup-ha-etcd-with-kubeadm.md
* fix typos (#10252)
* fix description of contribute guide (#10253)
* describe truncate feature about advanced audit (#10236)
* describe truncate feature about advanced audit
* Update audit.md
* docs update to promote ScheduleDaemonSetPods to beta (#9923)
* Dynamic volume limit updates for 1.12 (#10211)
* add a placeholder commit
* Update docs for csi volume limits
* Update storage-limits.md
* Add "MayRunAs" value among other GroupStrategies (#9888)
* Add CoreDNS details to the customize DNS doc (#10228)
* Add CoreDNS details to the customize DNS doc
Rewrite the document to include more details about CoreDNS, since it's now the default from v1.12
* Address comments
* Improve doc wording
* Fix link
* Update dns-custom-nameservers.md
* Update dns-custom-nameservers.md
* Fix secrets docs in 1.12 branch (#10056)
* Fix secrets docs
* Update secret.md
* Revert CoreDNS Docs (#10319)
* Revert "Add CoreDNS details to DNS Debug docs (#10201)"
This reverts commit 462817a67479fcc3481648981a4b90df35b86fdc.
* Revert "Add CoreDNS details to the customize DNS doc (#10228)"
This reverts commit e7319eeb8cde914d06cad039867e6213ecef1001.
* Revert "coredns default (#10200)"
This reverts commit 698e93b4415600d1a67f117132d8b09713282aa4.
* Add CRI installation instructions page
Added cri-installation page with CRI installation instructions
Referenced it from kubeadm-init and install-kubeadm pages.
* kubeadm: update API types documentation for 1.12 (#10283)
v1alpha2 -> v1alpha3
MasterConfiguration -> [new-api-types]
* TokenRequest feature documentation (#10295)
* AdvancedAuditing is now GA (#10156)
xref: kubernetes/kubernetes#65862
`AdvancedAuditing` feature is GA in 1.12. This PR adjusts the related
docs.
* update runtime-class.md (#10332)
* update runtime-class.md
* Update runtime-class.md
* Document cross-authorizer permissions for creating RBAC roles (#10015)
* Document cross-authorizer permissions for creating RBAC roles
* Update rbac.md
* kubeadm: update authored content for 1.12 (reference docs and cluster creation) (#10348)
* kubeadm: update authored content in reference docs for 1.12
* kubeadm: add time frame in create-cluster-kubeadm for 1.12
* add AllowedProcMountTypes and ProcMountType to docs (#9911)
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
* kubeadm: add new command line reference (#10306)
Add:
- placeholder files
- include place holder files
- include "renew" sub command
- add missing tabs for "alpha phase kubelet"
* Documenting SCTP support in Kubernetes (#10279)
* Documenting SCTP support in Kubernetes Service, Endpoint, NetworkPolicy and Pod
* Updates based on comments on the PR
* kubectl expose update with SCTP support
* Updated according to comments in the PR
* Revert "kubectl expose update with SCTP support"
This reverts commit 0d5a1e6720a012390cf100c83e16b4a8c0782356.
* TLS Bootstrap and Server Cert Rotation feature documentation (#10232)
* TokenRequest feature documentation
* line wrapping to make review not insane
* update content for GA without major refactor
* Update kubelet-tls-bootstrapping.md
* Add clarifications for volume snapshots (#10296)
* Update kubadm ha installation for 1.12 (#10264)
* Update kubadm ha installation for 1.12
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* update stable version
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Update stacked control plane for v1.12 (#2)
* use v1alpha3
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* more v1alpha3 (#4)
* updates
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Document how to run in-tree cloud providers with kubeadm (#10357)
Change-Id: Iab6b996a830503d74a6eb0c507c5f8ca7a39235b
* kubeadm reference doc for release 1.12 (#10359)
* Revert "Revert "Add CoreDNS details to DNS Debug docs (#10201)""
This reverts commit bb30f4d1fcd6fba2fe6190778ead99f8010033b7.
* Revert "Revert "Add CoreDNS details to the customize DNS doc (#10228)""
This reverts commit bc23d45c09d7b83cac130fe22a0bd91e72435862.
* Revert "Revert "coredns default (#10200)""
This reverts commit 7f4350d6ab7fc554ee53126d3875e845d2e43d1f.
* add missing instruction for ha guide (#10374)
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* kubeadm - Ha upgrade updates (#10340)
* Update HA upgrade docs
* Adds external etcd HA upgrade guide
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* copyedit
* more edits
* add runasgroup in psp (#10076)
* update KubeletPluginsWatcher feature gate (#10205)
* generated 1.12 docs
* Building Multi-arch images with Manifests (#10379)
In 1.12, a variety of images used in a typical kubernetes installation
have started to using manifests to better support environments with arm
or ppc64le architectures. For example all images used with kubeadm by
default have manifests, another would be all the tests in the
conformance test suite. Here we capture the best practices for everyone
to start using manifests in their own workflows.
Change-Id: I5ba4c5fe55ffc9486a8251760f3352be4f2e1494
* Upgrade docs for v1.12 (#10344)
* generated assets and docs
* remove 1.7
* update 1.12
* update plugin documentation under docs>tasks>extend-kubectl (#10259)
* update plugin documentation under docs>tasks>extend-kubectl
* Update kubectl-plugins.md
2018-09-27 23:41:39 +00:00
2017-03-20 22:35:51 +00:00
## Using a Private Registry
Private registries may require keys to read images from them.
Credentials can be provided in several ways:
- Using Google Container Registry
- Per-cluster
2017-11-13 20:02:31 +00:00
- automatically configured on Google Compute Engine or Google Kubernetes Engine
2017-03-20 22:35:51 +00:00
- all pods can read the project's private registry
- Using AWS EC2 Container Registry (ECR)
- use IAM roles and policies to control access to ECR repositories
- automatically refreshes ECR login credentials
- Using Azure Container Registry (ACR)
2018-09-07 15:57:19 +00:00
- Using IBM Cloud Container Registry
2017-03-20 22:35:51 +00:00
- Configuring Nodes to Authenticate to a Private Registry
- all pods can read any configured private registries
- requires node configuration by cluster administrator
- Pre-pulling Images
- all pods can use any images cached on a node
- requires root access to all nodes to setup
- Specifying ImagePullSecrets on a Pod
- only pods which provide own keys can access the private registry
2018-09-06 06:47:34 +00:00
2017-03-20 22:35:51 +00:00
Each option is described in more detail below.
### Using Google Container Registry
Kubernetes has native support for the [Google Container
Registry (GCR)](https://cloud.google.com/tools/container-registry/), when running on Google Compute
2017-11-13 20:02:31 +00:00
Engine (GCE). If you are running your cluster on GCE or Google Kubernetes Engine, simply
2017-03-20 22:35:51 +00:00
use the full image name (e.g. gcr.io/my_project/image:tag).
All pods in a cluster will have read access to images in this registry.
The kubelet will authenticate to GCR using the instance's
Google service account. The service account on the instance
will have a `https://www.googleapis.com/auth/devstorage.read_only` ,
so it can pull from the project's GCR, but not push.
### Using AWS EC2 Container Registry
Kubernetes has native support for the [AWS EC2 Container
Registry](https://aws.amazon.com/ecr/), when nodes are AWS EC2 instances.
Simply use the full image name (e.g. `ACCOUNT.dkr.ecr.REGION.amazonaws.com/imagename:tag` )
in the Pod definition.
All users of the cluster who can create pods will be able to run pods that use any of the
images in the ECR registry.
The kubelet will fetch and periodically refresh ECR credentials. It needs the following permissions to do this:
2017-07-28 15:23:11 +00:00
- `ecr:GetAuthorizationToken`
2017-03-20 22:35:51 +00:00
- `ecr:BatchCheckLayerAvailability`
- `ecr:GetDownloadUrlForLayer`
- `ecr:GetRepositoryPolicy`
- `ecr:DescribeRepositories`
- `ecr:ListImages`
- `ecr:BatchGetImage`
Requirements:
- You must be using kubelet version `v1.2.0` or newer. (e.g. run `/usr/bin/kubelet --version=true` ).
- If your nodes are in region A and your registry is in a different region B, you need version `v1.3.0` or newer.
- ECR must be offered in your region
Troubleshooting:
- Verify all requirements above.
- Get $REGION (e.g. `us-west-2` ) credentials on your workstation. SSH into the host and run Docker manually with those creds. Does it work?
- Verify kubelet is running with `--cloud-provider=aws` .
2017-07-03 08:11:30 +00:00
- Check kubelet logs (e.g. `journalctl -u kubelet` ) for log lines like:
2017-03-20 22:35:51 +00:00
- `plugins.go:56] Registering credential provider: aws-ecr-key`
- `provider.go:91] Refreshing cache for provider: *aws_credentials.ecrProvider`
### Using Azure Container Registry (ACR)
When using [Azure Container Registry ](https://azure.microsoft.com/en-us/services/container-registry/ )
you can authenticate using either an admin user or a service principal.
In either case, authentication is done via standard Docker authentication. These instructions assume the
[azure-cli ](https://github.com/azure/azure-cli ) command line tool.
You first need to create a registry and generate credentials, complete documentation for this can be found in
the [Azure container registry documentation ](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-azure-cli ).
Once you have created your container registry, you will use the following credentials to login:
2017-08-25 20:13:20 +00:00
2017-03-20 22:35:51 +00:00
* `DOCKER_USER` : service principal, or admin username
* `DOCKER_PASSWORD` : service principal password, or admin user password
* `DOCKER_REGISTRY_SERVER` : `${some-registry-name}.azurecr.io`
* `DOCKER_EMAIL` : `${some-email-address}`
2017-04-07 16:15:48 +00:00
Once you have those variables filled in you can
[configure a Kubernetes Secret and use it to deploy a Pod ](/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod ).
2017-03-20 22:35:51 +00:00
2018-09-07 15:57:19 +00:00
### Using IBM Cloud Container Registry
IBM Cloud Container Registry provides a multi-tenant private image registry that you can use to safely store and share your Docker images. By default, images in your private registry are scanned by the integrated Vulnerability Advisor to detect security issues and potential vulnerabilities. Users in your IBM Cloud account can access your images, or you can create a token to grant access to registry namespaces.
To install the IBM Cloud Container Registry CLI plug-in and create a namespace for your images, see [Getting started with IBM Cloud Container Registry ](https://console.bluemix.net/docs/services/Registry/index.html#index ).
You can use the IBM Cloud Container Registry to deploy containers from [IBM Cloud public images ](https://console.bluemix.net/docs/services/RegistryImages/index.html#ibm_images ) and your private images into the `default` namespace of your IBM Cloud Kubernetes Service cluster. To deploy a container into other namespaces, or to use an image from a different IBM Cloud Container Registry region or IBM Cloud account, create a Kubernetes `imagePullSecret` . For more information, see [Building containers from images ](https://console.bluemix.net/docs/containers/cs_images.html#images ).
2017-03-20 22:35:51 +00:00
2018-08-29 17:34:03 +00:00
### Configuring Nodes to Authenticate to a Private Registry
2017-03-20 22:35:51 +00:00
2018-07-20 23:03:46 +00:00
{{< note > }}
2018-11-06 19:33:04 +00:00
If you are running on Google Kubernetes Engine, there will already be a `.dockercfg` on each node with credentials for Google Container Registry. You cannot use this approach.
2018-07-20 23:03:46 +00:00
{{< / note > }}
2017-03-20 22:35:51 +00:00
2018-07-20 23:03:46 +00:00
{{< note > }}
2018-11-06 19:33:04 +00:00
If you are running on AWS EC2 and are using the EC2 Container Registry (ECR), the kubelet on each node will
2017-03-20 22:35:51 +00:00
manage and update the ECR login credentials. You cannot use this approach.
2018-07-20 23:03:46 +00:00
{{< / note > }}
2017-03-20 22:35:51 +00:00
2018-07-20 23:03:46 +00:00
{{< note > }}
2018-11-06 19:33:04 +00:00
This approach is suitable if you can control node configuration. It
2017-03-20 22:35:51 +00:00
will not work reliably on GCE, and any other cloud provider that does automatic
node replacement.
2018-07-20 23:03:46 +00:00
{{< / note > }}
2017-03-20 22:35:51 +00:00
2018-07-19 02:20:42 +00:00
Docker stores keys for private registries in the `$HOME/.dockercfg` or `$HOME/.docker/config.json` file. If you put the same file
in the search paths list below, kubelet uses it as the credential provider when pulling images.
* `{--root-dir:-/var/lib/kubelet}/config.json`
* `{cwd of kubelet}/config.json`
* `${HOME}/.docker/config.json`
* `/.docker/config.json`
* `{--root-dir:-/var/lib/kubelet}/.dockercfg`
* `{cwd of kubelet}/.dockercfg`
* `${HOME}/.dockercfg`
* `/.dockercfg`
{{< note > }}
2018-11-06 19:33:04 +00:00
You may have to set `HOME=/root` explicitly in your environment file for kubelet.
2018-07-19 02:20:42 +00:00
{{< / note > }}
2017-03-20 22:35:51 +00:00
Here are the recommended steps to configuring your nodes to use a private registry. In this
example, run these on your desktop/laptop:
1. Run `docker login [server]` for each set of credentials you want to use. This updates `$HOME/.docker/config.json` .
1. View `$HOME/.docker/config.json` in an editor to ensure it contains just the credentials you want to use.
1. Get a list of your nodes, for example:
- if you want the names: `nodes=$(kubectl get nodes -o jsonpath='{range.items[*].metadata}{.name} {end}')`
- if you want to get the IPs: `nodes=$(kubectl get nodes -o jsonpath='{range .items[*].status.addresses[?(@.type=="ExternalIP")]}{.address} {end}')`
2018-07-19 02:20:42 +00:00
1. Copy your local `.docker/config.json` to one of the search paths list above.
- for example: `for n in $nodes; do scp ~/.docker/config.json root@$n:/var/lib/kubelet/config.json; done`
2017-03-20 22:35:51 +00:00
Verify by creating a pod that uses a private image, e.g.:
```yaml
2018-07-20 23:03:46 +00:00
kubectl create -f - < < EOF
2017-03-20 22:35:51 +00:00
apiVersion: v1
kind: Pod
metadata:
name: private-image-test-1
spec:
containers:
- name: uses-private-image
image: $PRIVATE_IMAGE_NAME
imagePullPolicy: Always
command: [ "echo", "SUCCESS" ]
EOF
2018-08-21 14:29:39 +00:00
pod/private-image-test-1 created
2017-03-20 22:35:51 +00:00
```
If everything is working, then, after a few moments, you should see:
```shell
2018-07-20 23:03:46 +00:00
kubectl logs private-image-test-1
2017-03-20 22:35:51 +00:00
SUCCESS
```
If it failed, then you will see:
```shell
2018-07-20 23:03:46 +00:00
kubectl describe pods/private-image-test-1 | grep "Failed"
2017-03-23 07:10:00 +00:00
Fri, 26 Jun 2015 15:36:13 -0700 Fri, 26 Jun 2015 15:39:13 -0700 19 {kubelet node-i2hq} spec.containers{uses-private-image} failed Failed to pull image "user/privaterepo:v1": Error: image user/privaterepo:v1 not found
2017-03-20 22:35:51 +00:00
```
You must ensure all nodes in the cluster have the same `.docker/config.json` . Otherwise, pods will run on
some nodes and fail to run on others. For example, if you use node autoscaling, then each instance
template needs to include the `.docker/config.json` or mount a drive that contains it.
All pods will have read access to images in any private registry once private
registry keys are added to the `.docker/config.json` .
### Pre-pulling Images
2018-07-20 23:03:46 +00:00
{{< note > }}
2018-11-06 19:33:04 +00:00
If you are running on Google Kubernetes Engine, there will already be a `.dockercfg` on each node with credentials for Google Container Registry. You cannot use this approach.
2018-07-20 23:03:46 +00:00
{{< / note > }}
2017-03-20 22:35:51 +00:00
2018-07-20 23:03:46 +00:00
{{< note > }}
2018-11-06 19:33:04 +00:00
This approach is suitable if you can control node configuration. It
2017-03-20 22:35:51 +00:00
will not work reliably on GCE, and any other cloud provider that does automatic
node replacement.
2018-07-20 23:03:46 +00:00
{{< / note > }}
2017-03-20 22:35:51 +00:00
2017-05-05 05:32:25 +00:00
By default, the kubelet will try to pull each image from the specified registry.
2017-03-20 22:35:51 +00:00
However, if the `imagePullPolicy` property of the container is set to `IfNotPresent` or `Never` ,
then a local image is used (preferentially or exclusively, respectively).
If you want to rely on pre-pulled images as a substitute for registry authentication,
you must ensure all nodes in the cluster have the same pre-pulled images.
This can be used to preload certain images for speed or as an alternative to authenticating to a private registry.
All pods will have read access to any pre-pulled images.
### Specifying ImagePullSecrets on a Pod
2018-07-20 23:03:46 +00:00
{{< note > }}
2018-11-06 19:33:04 +00:00
This approach is currently the recommended approach for Google Kubernetes Engine, GCE, and any cloud-providers
2017-03-20 22:35:51 +00:00
where node creation is automated.
2018-07-20 23:03:46 +00:00
{{< / note > }}
2017-03-20 22:35:51 +00:00
Kubernetes supports specifying registry keys on a pod.
#### Creating a Secret with a Docker Config
Run the following command, substituting the appropriate uppercase values:
```shell
2018-07-20 23:03:46 +00:00
kubectl create secret docker-registry myregistrykey --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
2018-08-21 14:29:39 +00:00
secret/myregistrykey created.
2017-03-20 22:35:51 +00:00
```
If you need access to multiple registries, you can create one secret for each registry.
Kubelet will merge any `imagePullSecrets` into a single virtual `.docker/config.json`
when pulling images for your Pods.
Pods can only reference image pull secrets in their own namespace,
so this process needs to be done one time per namespace.
##### Bypassing kubectl create secrets
If for some reason you need multiple items in a single `.docker/config.json` or need
control not given by the above command, then you can [create a secret using
json or yaml](/docs/user-guide/secrets/#creating-a-secret-manually).
Be sure to:
- set the name of the data item to `.dockerconfigjson`
- base64 encode the docker file and paste that string, unbroken
as the value for field `data[".dockerconfigjson"]`
- set `type` to `kubernetes.io/dockerconfigjson`
Example:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: myregistrykey
namespace: awesomeapps
data:
.dockerconfigjson: UmVhbGx5IHJlYWxseSByZWVlZWVlZWVlZWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGx5eXl5eXl5eXl5eXl5eXl5eXl5eSBsbGxsbGxsbGxsbGxsbG9vb29vb29vb29vb29vb29vb29vb29vb29vb25ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubmdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2cgYXV0aCBrZXlzCg==
type: kubernetes.io/dockerconfigjson
```
If you get the error message `error: no objects passed to create` , it may mean the base64 encoded string is invalid.
2017-08-28 19:20:29 +00:00
If you get an error message like `Secret "myregistrykey" is invalid: data[.dockerconfigjson]: invalid value ...` , it means
2017-03-20 22:35:51 +00:00
the data was successfully un-base64 encoded, but could not be parsed as a `.docker/config.json` file.
#### Referring to an imagePullSecrets on a Pod
Now, you can create pods which reference that secret by adding an `imagePullSecrets`
section to a pod definition.
```yaml
apiVersion: v1
kind: Pod
metadata:
name: foo
namespace: awesomeapps
spec:
containers:
- name: foo
image: janedoe/awesomeapp:v1
imagePullSecrets:
- name: myregistrykey
```
This needs to be done for each pod that is using a private registry.
However, setting of this field can be automated by setting the imagePullSecrets
in a [serviceAccount ](/docs/user-guide/service-accounts ) resource.
2018-01-04 03:35:33 +00:00
Check [Add ImagePullSecrets to a Service Account ](/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account ) for detailed instructions.
2017-03-20 22:35:51 +00:00
You can use this in conjunction with a per-node `.docker/config.json` . The credentials
2017-11-13 20:02:31 +00:00
will be merged. This approach will work on Google Kubernetes Engine.
2017-03-20 22:35:51 +00:00
### Use Cases
There are a number of solutions for configuring private registries. Here are some
common use cases and suggested solutions.
1. Cluster running only non-proprietary (e.g. open-source) images. No need to hide images.
- Use public images on the Docker hub.
2017-08-28 19:20:29 +00:00
- No configuration required.
2017-11-13 20:02:31 +00:00
- On GCE/Google Kubernetes Engine, a local mirror is automatically used for improved speed and availability.
2017-03-20 22:35:51 +00:00
1. Cluster running some proprietary images which should be hidden to those outside the company, but
visible to all cluster users.
2017-08-28 19:20:29 +00:00
- Use a hosted private [Docker registry ](https://docs.docker.com/registry/ ).
2018-12-22 01:44:38 +00:00
- It may be hosted on the [Docker Hub ](https://hub.docker.com/signup ), or elsewhere.
2017-08-28 19:20:29 +00:00
- Manually configure .docker/config.json on each node as described above.
2017-03-20 22:35:51 +00:00
- Or, run an internal private registry behind your firewall with open read access.
2017-08-28 19:20:29 +00:00
- No Kubernetes configuration is required.
2017-11-13 20:02:31 +00:00
- Or, when on GCE/Google Kubernetes Engine, use the project's Google Container Registry.
2017-08-28 19:20:29 +00:00
- It will work better with cluster autoscaling than manual node configuration.
2017-03-20 22:35:51 +00:00
- Or, on a cluster where changing the node configuration is inconvenient, use `imagePullSecrets` .
2017-08-28 19:20:29 +00:00
1. Cluster with a proprietary images, a few of which require stricter access control.
2018-07-18 22:54:21 +00:00
- Ensure [AlwaysPullImages admission controller ](/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages ) is active. Otherwise, all Pods potentially have access to all images.
2017-03-20 22:35:51 +00:00
- Move sensitive data into a "Secret" resource, instead of packaging it in an image.
2017-08-28 19:20:29 +00:00
1. A multi-tenant cluster where each tenant needs own private registry.
2018-07-18 22:54:21 +00:00
- Ensure [AlwaysPullImages admission controller ](/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages ) is active. Otherwise, all Pods of all tenants potentially have access to all images.
2017-08-28 19:20:29 +00:00
- Run a private registry with authorization required.
- Generate registry credential for each tenant, put into secret, and populate secret to each tenant namespace.
- The tenant adds that secret to imagePullSecrets of each namespace.
2017-04-25 17:36:59 +00:00
2018-05-05 16:00:51 +00:00
{{% /capture %}}