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

TLS certificate management task assumes Linux-style base64 command #48586

Open
Jaybee18 opened this issue Oct 29, 2024 · 4 comments
Open

TLS certificate management task assumes Linux-style base64 command #48586

Jaybee18 opened this issue Oct 29, 2024 · 4 comments
Assignees
Labels
language/en Issues or PRs related to English language priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Jaybee18
Copy link

During the "Upload the signed certificate" step (https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/#upload-the-signed-certificate) the command didn't work without the "-i" option using the base64 command.

So instead of

kubectl get csr my-svc.my-namespace -o json | \
  jq '.status.certificate = "'$(base64 ca-signed-server.pem | tr -d '\n')'"' | \
  kubectl replace --raw /apis/certificates.k8s.io/v1/certificatesigningrequests/my-svc.my-namespace/status -f -

it had to be

kubectl get csr my-svc.my-namespace -o json | \
  jq '.status.certificate = "'$(base64 -i ca-signed-server.pem | tr -d '\n')'"' | \
  kubectl replace --raw /apis/certificates.k8s.io/v1/certificatesigningrequests/my-svc.my-namespace/status -f -

for me.

Is it a me problem or a general problem?

I'm on MacOS Sonoma 14.5

❯ base64 --version
FreeBSD base64
@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 29, 2024
@T-Lakshmi
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Oct 29, 2024
@ayushpatil2122
Copy link
Contributor

/assign

@Jaybee18
Copy link
Author

Hey @ayushpatil2122,

I found a source saying this is only an issue with the newest MacOS versions.
I suppose it works with normal linux.
Maybe a short notice in the text is enough as opposed to changing the command?

@sftim
Copy link
Contributor

sftim commented Nov 7, 2024

I think this is worth fixing. We can't assume that people run Linux (most don't).

/triage accepted
/priority backlog
/retitle TLS certificate management task assumes Linux-style base64 command

@k8s-ci-robot k8s-ci-robot changed the title Issue with k8s.io/docs/tasks/tls/managing-tls-in-a-cluster/ TLS certificate management task assumes Linux-style base64 command Nov 7, 2024
@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/en Issues or PRs related to English language priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants