使用token

token="eyJhbGciOiJSUzI1NiIsI..."
curl --cacert /etc/kubernetes/pki/ca.crt -H "Authorization: Bearer $token"  https://192.168.31.61:6443/api/v1/namespaces/default/pods

使用证书

curl https://192.168.31.61:6443/api/v1/nodes \
--cacert /etc/kubernetes/pki/ca.crt \
--cert /etc/kubernetes/pki/apiserver-kubelet-client.crt \
--key /etc/kubernetes/pki/apiserver-kubelet-client.key   
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐