liveBook · Manning

Kubectl apply

As explained in Road to Kubernetes

kubectl apply is a kubectl command that creates or updates Kubernetes resources from configuration manifests.

kubectl apply creates or updates Kubernetes resources from configuration manifests. Running kubectl apply -f apps/ applies manifest changes from the apps/ directory. section 8.5.2

Use kubectl apply as part of a repeatable deployment workflow:

  • Configure kubectl with a kubeconfig file. section 8.5.2
  • Inspect running Pods and Deployments with kubectl get. section 8.5.2
  • Apply changed manifests with kubectl apply -f apps/. section 8.5.2
  • Restart Deployments explicitly when reusing an unchanged image tag such as :latest. section 8.5.2

How Road to Kubernetes covers it

How deep it goes
Explains manifest application and unchanged-image behavior, but stops short of kubectl internals.
Examples
Uses an apps/ directory and py-deploy and js-deploy Deployments in a GitHub Actions workflow.
What it assumes
Requires a kubeconfig and Kubernetes manifests describing resources such as Pods and Deployments.
What you can do after
Operate/configure Kubernetes deployments by applying an apps/ manifest directory through kubectl.
How it connects
Connects Kubernetes manifests with Deployments, rollouts, kubeconfig, GitHub Actions, and container image tags.

Also explained in

Compare how 6 books explain kubectl apply →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.