-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document images. #1690
Merged
Merged
Document images. #1690
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Images | ||
Each container in a pod has its own image. Currently, the only type of image supported is a [Docker Image](https://docs.docker.com/userguide/dockerimages/). | ||
|
||
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. | ||
|
||
## Using a Private Registry | ||
Keys for private registries are stored in a `.dockercfg` file. Create a config file by running `docker login <registry>.<domain>` and then copying the resulting `.dockercfg` file to the kubelet working dir. | ||
The kubelet working dir varies by cloud provider. It is `/` on GCE and `/home/core` on CoreOS. You can determine the working dir by running this command: | ||
`sudo ls -ld /proc/$(pidof kubelet)/cwd` on a kNode. | ||
|
||
All users of the cluster will have access to any private registry in the `.dockercfg`. | ||
|
||
## Preloading Images | ||
|
||
Be default, the kubelet will try to pull each image from the specified registry. | ||
However, if the `imagePullPolicy` property of the container is set to `PullIfNotPresent` or `PullNever`, | ||
then a local image is used (preferentially or exclusively, respectively). | ||
|
||
This can be used to preload certain images for speed or as an alternative to authenticating to a private registry. | ||
|
||
Pull Policy is per-container, but any user of the cluster will have access to all local images. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubelet has a root dir flag - shouldn't we use that rather than "it depends" ? Writing files in / is horrible.