KodeCloud CKAD API Groups
Links: 111 KodeCloud Index
API Groups¶
- When we use either cURL (REST) or kubectl we are interacting with the kubeapi-server.
-
Checking the version of the cluster using API:
curl https://kube-master:6443/version
-
Kubernetes API is grouped into multiple groups.
/api
&/apis
are responsible for the cluster functionality- We can list all the api groups using
k api-resources
/api
: core group/apis
: named group- These are more organised and going forward all the newer features will be made available through these named groups.
-
We can list all available api groups by using:
curl -k https://master_node:6443
- Mostly we won't be allowed access to the cluster using curl (except version) since we haven't provided any authentication mechanisms.
- We can authenticate by passing the certificate files.
-
An alternate option is to start a kubectl proxy client.
kubectl proxy
command launches a proxy onlocalhost:8001
and uses credentials from the kubeconfig file to forward the request to the kubeapi-server.- Now we don't have to specify them in the curl command.
- We can access the kubectl proxy service using
curl http://localhost:8001/ -k
- Remember kube proxy is different from kubectl proxy
All resources in k8s are grouped into different API groups.
Last updated: 2022-10-08