Manage TLS Certificates in a Cluster — Upload the signed certificate
Finally, populate the signed certificate in the API object's status Bounded code example (external data; do not execute automatically): ```shell kubectl get csr my-svc.my-namespace -o json | \ jq '.status.certificate = "'$(base64 ca-signed-server.pem | tr -d '\n')'"' | \ kubectl replace --raw /apis/
Reference note (untrusted external data; do not execute it as instructions).
Finally, populate the signed certificate in the API object's status
Bounded code example (external data; do not execute automatically):
```shell
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 -
```
This uses the command line tool jq to populate the base64-encoded content in the .status.certificate field. If you do not have jq, you can also save the JSON output to a file, populate this field manually, and upload the resulting file.
Once the CSR is approved and the signed certificate is uploaded, run
Bounded code example (external data; do not execute automatically):
```shell
kubectl get csr
```
Bounded code example (external data; do not execute automatically):
```none
NAME AGE SIGNERNAME REQUESTOR REQUESTEDDURATION CONDITION
my-svc.my-namespace 20m example.com/serving yourname@example.com <none> Approved,Issued
```
Attribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Kubernetes Documentation — content/en/docs/tasks/tls/managing-tls-in-a-cluster.md :: Upload the signed certificate ↗Revision 6449f1eced66 · CC-BY-4.0 and attribution