File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
content/en/docs/tasks/tls Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ Configurations with a single API server will experience unavailability while the
51
51
If any pods are started before new CA is used by API servers, they will get this update and trust both old and new CAs.
52
52
53
53
``` shell
54
- base64_encoded_ca=" $( base64 < path to file containing both old and new CAs> ) "
54
+ base64_encoded_ca=" $( base64 -w0 < path to file containing both old and new CAs> ) "
55
55
56
56
for namespace in $( kubectl get ns --no-headers | awk ' {print $1}' ) ; do
57
57
for token in $( kubectl get secrets --namespace " $namespace " --field-selector type=kubernetes.io/service-account-token -o name) ; do
58
58
kubectl get $token --namespace " $namespace " -o yaml | \
59
- /bin/sed " s/\(ca.crt:\).*/\1 ${base64_encoded_ca} " | \
59
+ /bin/sed " s/\(ca.crt:\).*/\1 ${base64_encoded_ca} / " | \
60
60
kubectl apply -f -
61
61
done
62
62
done
@@ -132,10 +132,10 @@ Configurations with a single API server will experience unavailability while the
132
132
1. If your cluster is using bootstrap tokens to join nodes, update the ConfigMap ` cluster-info` in the ` kube-public` namespace with new CA.
133
133
134
134
` ` ` shell
135
- base64_encoded_ca=" $( base64 /etc/kubernetes/pki/ca.crt) "
135
+ base64_encoded_ca=" $( base64 -w0 /etc/kubernetes/pki/ca.crt) "
136
136
137
137
kubectl get cm/cluster-info --namespace kube-public -o yaml | \
138
- /bin/sed " s/\(certificate-authority-data:\).*/\1 ${base64_encoded_ca} " | \
138
+ /bin/sed " s/\(certificate-authority-data:\).*/\1 ${base64_encoded_ca} / " | \
139
139
kubectl apply -f -
140
140
` ` `
141
141
You can’t perform that action at this time.
0 commit comments