forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com> Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
3.5 KiB
3.5 KiB
Connecting to a Cluster Using an X.509 Certificate
Scenario
This section describes how to obtain the cluster certificate from the console and use it access Kubernetes clusters.
Procedure
- Log in to the CCE console and click the cluster name to access the cluster console.
- On the Overview page, locate the Connection Info area, and click Download next to X.509 certificate.
- In the Obtain Certificate dialog box displayed, select the certificate expiration time and download the X.509 certificate of the cluster as prompted.
- Call native Kubernetes APIs using the cluster certificate.
For example, run the curl command to call an API to view the pod information. In the following information, 192.168.0.18:5443 indicates the IP address of the API server in the cluster.
curl --cacert ./ca.crt --cert ./client.crt --key ./client.key https://192.168.0.18:5443/api/v1/namespaces/default/pods/
For more cluster APIs, see Kubernetes APIs.
Parent topic: Connecting to a Cluster