-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Make image registry hostname more obvious in example #42446
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Instead of making this change, it'd be valuable to spell it out like you've done in the linked issue.
Something on the lines of the below?
There is no global registry prefix configuration for Kubernetes. Without any prefix appended to the image name, the image will be pulled from docker.io/library.
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.
I'm afraid I think we need a bigger change here.
@@ -341,7 +341,7 @@ Now, when a new Pod is created in the current namespace and using the default | |||
ServiceAccount, the new Pod has its `spec.imagePullSecrets` field set automatically: | |||
|
|||
```shell | |||
kubectl run nginx --image=nginx --restart=Never | |||
kubectl run nginx --image=DUMMY_SERVER/nginx --restart=Never |
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.
_
isn't common in hostnames. Can we swap DUMMY_SERVER
with image-registry.some.example
or something like that?
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.
Updated.
We should document that somewhere; also, we should document where the defaulting happens (is it within the API server, the kubelet, or the thing at the other end of the CRI socket?) |
This is more likely a logic in container runtime. Docker is the initial runtime and it uses it as the default one.
Some other references:
|
@@ -341,7 +341,7 @@ Now, when a new Pod is created in the current namespace and using the default | |||
ServiceAccount, the new Pod has its `spec.imagePullSecrets` field set automatically: | |||
|
|||
```shell | |||
kubectl run nginx --image=nginx --restart=Never | |||
kubectl run nginx --image=image-registry.some.example/nginx --restart=Never |
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.
How about this? I mean, making it "fail" explicitly.
kubectl run nginx --image=image-registry.some.example/nginx --restart=Never | |
kubectl run nginx --image=<registry name>/nginx --restart=Never |
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.
Whatever we pick, we should change this:
kubectl create secret docker-registry myregistrykey --docker-server=DUMMY_SERVER \
--docker-username=DUMMY_USERNAME --docker-password=DUMMY_DOCKER_PASSWORD \
--docker-email=DUMMY_DOCKER_EMAIL
to match.
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.
Using <registry name>
is more clear.
791f391
to
810272b
Compare
Hello, @pacoxu . |
810272b
to
9e09739
Compare
rebased with latest main branch and force pushed. |
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.
/lgtm
LGTM label has been added. Git tree hash: adc9fa459e1be0921bf3fa8052c16134d09d23b2
|
/retitle Make image registry hostname more obvious in example |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes kubernetes/kubernetes#119650
website/content/en/docs/tasks/configure-pod-container/configure-service-account.md
Lines 273 to 277 in c818b27