Changes

m
Line 45: Line 45:  
<pre>
 
<pre>
 
curl -X POST "https://localhost:10250/checkpoint/default/counters/counter"
 
curl -X POST "https://localhost:10250/checkpoint/default/counters/counter"
 +
</pre>
 +
 +
The following command-line options are necessary for <code>curl</code> to accept the kubelet's self signed certificate and authorize the use of the kubelet checkpoint API:
 +
 +
<pre>
 +
--insecure --cert client-admin.crt --key client-admin.key
 +
</pre>
 +
 +
The <code>client-admin.crt</code> and <code>client-admin.key</code> files can be created as follows:
 +
<pre>
 +
kubectl config view --raw \
 +
| awk '/client-certificate-data:/ {print $2; exit}' \
 +
| base64 -d > client-admin.crt
 +
</pre>
 +
 +
<pre>
 +
kubectl config view --raw --minify -o jsonpath='{.users[0].user.client-key-data}' \
 +
| base64 -d > client-admin.key
 +
chmod 600 client-admin.key
 
</pre>
 
</pre>
509

edits