Skip to content

dhi: add guide to use in Kubernetes#23393

Merged
craig-osterhout merged 1 commit into
docker:mainfrom
LaurentGoderre:dhi-k8s
Sep 16, 2025
Merged

dhi: add guide to use in Kubernetes#23393
craig-osterhout merged 1 commit into
docker:mainfrom
LaurentGoderre:dhi-k8s

Conversation

@LaurentGoderre
Copy link
Copy Markdown
Member

@LaurentGoderre LaurentGoderre commented Sep 10, 2025

Description

dhi: add guide to use in Kubernetes. For now, this only covers image pull secrets.

Reviews

  • Technical review
  • Editorial review
  • Product review

@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 10, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 7d6b62b
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/68c42950b1fa1c0008cd3895
😎 Deploy Preview https://deploy-preview-23393--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@LaurentGoderre LaurentGoderre force-pushed the dhi-k8s branch 2 times, most recently from 909220f to 9ea3ac7 Compare September 10, 2025 20:10
@craig-osterhout craig-osterhout added the status/review Pull requests that are ready for review label Sep 10, 2025
Copy link
Copy Markdown
Contributor

@craig-osterhout craig-osterhout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @LaurentGoderre. Added a few polish nits, but otherwise LGTM.

Comment thread content/manuals/dhi/how-to/k8s.md Outdated
Comment thread content/manuals/dhi/how-to/k8s.md Outdated
Comment thread content/manuals/dhi/how-to/k8s.md Outdated
Comment thread content/manuals/dhi/how-to/k8s.md Outdated
Comment thread content/manuals/dhi/how-to/k8s.md Outdated
@LaurentGoderre
Copy link
Copy Markdown
Member Author

@craig-osterhout all fixed!

@craig-osterhout
Copy link
Copy Markdown
Contributor

Thanks again. Let us know whenever it's ready to merge.

Copy link
Copy Markdown

@orndorffgrant orndorffgrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works! Just some minor suggestions. None of this is blocking.

Comment thread content/manuals/dhi/how-to/k8s.md Outdated
Comment thread content/manuals/dhi/how-to/k8s.md Outdated
Alternatively, you can create the secret manually using a Personal Access Token (PAT).
Ensure the token has at least read-only access to private repositories. For Docker Hub
replace `<registry server>` with `docker.io`.

```console
$ kubectl create -n <kubernetes namespace> secret docker-registry <secret name> --docker-server=<registry server> \
--docker-username=<registry user> --docker-password=<access token> \
--docker-email=<registry email>
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked great!

Comment thread content/manuals/dhi/how-to/k8s.md
Comment thread content/manuals/dhi/how-to/k8s.md Outdated
metadata:
name: dhi-test
namespace: <kubernetes namespace>
spec:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also explicitly state run as non root so we have a fail-fast safety net?

Suggested change
spec:
spec:
securityContext:
runAsNonRoot: true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could but I was trying to keep the spec as minimal as possible.

@LaurentGoderre
Copy link
Copy Markdown
Member Author

@craig-osterhout I think we are good to merge

@craig-osterhout craig-osterhout merged commit 040f6af into docker:main Sep 16, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dhi status/review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants