July 2019
Intermediate to advanced
502 pages
14h
English
It's important to distinguish between Kubernetes resources and the underlying infrastructure resources they depend on. For Kubernetes resources, the Kubernetes API is the way to go. How you interact with the API is up to you, but I recommend that you generate YAML files and run them through kubectl create or kubectl apply as part of your CI/CD pipeline.
Commands like kubectl run and kubectl scale are useful for interactive exploration of your cluster and running ad hoc tasks, but they go against the grain of declarative infrastructure as code.
You could also directly hit the REST endpoints of the Kubernetes API or use a client library if you have a very complex CI/CD workflow that you implement using some ...