Skip to content
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

Incorrect example manifest for Pod with secretRef #48644

Open
shafiquer76 opened this issue Nov 5, 2024 · 6 comments
Open

Incorrect example manifest for Pod with secretRef #48644

shafiquer76 opened this issue Nov 5, 2024 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@shafiquer76
Copy link

I tried the code form the page but it didnt work.

Please change this below for pod definition to use the secretRef like this

envFrom:
- secretRef:
name: db-secret

There is an issue on the definition file. the '- secretRef: ' to be moved one tab

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Nov 5, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@iheartNathan
Copy link
Contributor

iheartNathan commented Nov 5, 2024

@shafiquer76
The current pod manifest in the documentation you referenced works as expected.

controlplane $ cat <<EOF | k apply -f -
> apiVersion: v1
> kind: Pod
> metadata:
>   name: envfrom-secret
> spec:
>   containers:
>   - name: envars-test-container
>     image: nginx
>     envFrom:
>     - secretRef:
>         name: test-secret
> EOF
pod/envfrom-secret created
controlplane $ k get po
NAME             READY   STATUS    RESTARTS   AGE
envfrom-secret   1/1     Running   0          17s

@dipesh-rawat
Copy link
Member

/retitle Incorrect example manifest for Pod with secretRef
/kind bug

@k8s-ci-robot k8s-ci-robot changed the title Issue with k8s.io/docs/tasks/inject-data-application/distribute-credentials-secure/ Incorrect example manifest for Pod with secretRef Nov 5, 2024
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 5, 2024
@dipesh-rawat
Copy link
Member

Page reported in issue (based on initial title): https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/
/language en

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Nov 5, 2024
@dipesh-rawat
Copy link
Member

It appears that the current example is functioning as intended based on #48644 (comment)

/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Nov 5, 2024
@network-charles
Copy link
Contributor

@shafiquer76, you should create the secret first using kubectl.

kubectl create secret generic test-secret --from-literal=username='my-app' --from-literal=password='39528$vdg7Jb'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

5 participants