Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.03 KB

kubernetes-api.md

File metadata and controls

39 lines (31 loc) · 1.03 KB

API

⬅️ Back to Kubernetes overview

Structure, API / Kind Most frequently used resources: Deployment, Service, ConfigMap, Secret

kubectl api-resources

💡 Use short names to save time typing

📝 Which of the API versions occurs most often?

Inspect Kubernetes resources

kubectl explain
kubectl explain deployment.spec.replicas
kubectl explain deployment.spec.selector --recursive

Also see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/

📝 Can get more information about the field nodeName for a Pod specification?

Access the API natively without having to fiddle with authentication

kubectl proxy
curl http://localhost:8001/
curl http://localhost:8001/api/v1/pods

Check out the OpenAPI spec of your cluster

curl http://localhost:8001/openapi/v2

Can load it into any OpenAPI browser like https://editor.swagger.io/ (might be slow, does not allow mixing http/https so go via file)

curl http://localhost:8001/openapi/v2 -o k8s-api.yaml