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

Invalid example manifest for .dockercfg Secret #48533

Open
Linda-sa opened this issue Oct 24, 2024 · 6 comments
Open

Invalid example manifest for .dockercfg Secret #48533

Linda-sa opened this issue Oct 24, 2024 · 6 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. 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

@Linda-sa
Copy link

Linda-sa commented Oct 24, 2024

The yaml specification in creates the following error:

apiVersion: v1
kind: Secret
metadata:
  name: secret-dockercfg-4
  namespace: service-namespace
type: kubernetes.io/dockercfg
data:
  .dockercfg: |
    eyJhdXRocyI6eyJodHRwczovL2V4YW1wbGUvdjEvIjp7ImF1dGgiOiJvcGVuc2VzYW1lIn19fQo=

Error from server (BadRequest): error when creating "dock3.yaml": Secret in version "v1" cannot be handled as a Secret: illegal base64 data at input byte 76

The file yaml specification needs to be updated to the below (removing the pipe | from the yaml):

apiVersion: v1
kind: Secret
metadata:
  name: secret-dockercfg-4
  namespace: service-namespace
type: kubernetes.io/dockercfg
data:
  .dockercfg: 
    eyJhdXRocyI6eyJodHRwczovL2V4YW1wbGUvdjEvIjp7ImF1dGgiOiJvcGVuc2VzYW1lIn19fQo=
@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.

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

sftim commented Oct 24, 2024

/retitle Invalid example manifest for .dockercfg Secret
/kind bug

@k8s-ci-robot k8s-ci-robot changed the title Secret Yaml Specification on Kubernetes Website: secret/dockercfg-secret.yaml Invalid example manifest for .dockercfg Secret Oct 24, 2024
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 24, 2024
@priyanshsao
Copy link

/assign

@steve-hardman
Copy link
Contributor

The existing yaml is working for me. I think the bug might not be in the example file. It might be a user error or something else.

> kubectl create -f https://k8s.io/examples/secret/dockercfg-secret.yaml
secret/secret-dockercfg created

@sftim
Copy link
Contributor

sftim commented Oct 26, 2024

/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 Oct 26, 2024
@Shubham82
Copy link
Contributor

@Linda-sa, The dockercfg-secret.yaml is correct and I tried to create Secret from it and it is working fine for me also.

Please find the observation below:

$ kubectl create -f https://k8s.io/examples/secret/dockercfg-secret.yaml
secret/secret-dockercfg created


$ kubectl get secrets
NAME               TYPE                      DATA   AGE
secret-dockercfg   kubernetes.io/dockercfg   1      3m52s

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. 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

6 participants