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

Make TLS certificate management work for multiple OSs #48745

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions content/en/docs/tasks/tls/managing-tls-in-a-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,24 @@ This produces a signed serving certificate file, `ca-signed-server.pem`.

Finally, populate the signed certificate in the API object's status:

```shell
{{< tabs name="Upload the signed certificate" >}}
{{< tab name="Linux" codelang="bash" >}}
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 -
ayushpatil2122 marked this conversation as resolved.
Show resolved Hide resolved
{{< /tab >}}
{{< tab name="macOS" codelang="bash" >}}
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 -
ayushpatil2122 marked this conversation as resolved.
Show resolved Hide resolved
{{< /tab >}}
{{< tab name="Windows" codelang="bash" >}}
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 -
```
{{< /tab >}}
{{< /tabs >}}


{{< note >}}
This uses the command line tool [`jq`](https://jqlang.github.io/jq/) to populate the base64-encoded
Expand Down