Kubectl apply
kubectl apply is a Kubernetes command that creates or updates resources according to declarative configuration.
Acing the Certified Kubernetes Administrator Exam, Second Edition
kubectl apply is a kubectl command that creates a Kubernetes resource or updates an existing resource from configuration.
- How it is used
- Deploys declarative YAML configuration and lets Kubernetes reconcile current resources toward the specified desired state.
- How deep it goes
- Explains create, update, replacement, reconciliation, and verification, but defers Deployment and rollout details.
- Examples
- Uses Pod manifests, node-selector scheduling, multi-container Pod creation, and kubectl get or logs commands for verification.
- What you can do after
- Apply it via kubectl, update resources from manifests, and verify resulting scheduling or Pod state with kubectl commands.
Read how Acing the Certified Kubernetes Administrator Exam, Second Edition explains kubectl apply →
Learn Docker in a Month of Lunches, Second Edition
kubectl apply is a kubectl command that creates or updates Kubernetes resources from declarative configuration.
- How it is used
- Deploys declarative YAML models and reconciles Kubernetes resources with their desired state.
- How deep it goes
- Explains the command through runnable Pod and Service workflows, stopping short of detailed apply internals.
- Examples
- Uses basic Pod YAML, a random-number API Pod, and a Service applied with kubectl apply.
- What you can do after
- Operate/configure Kubernetes resources, then verify them with kubectl get, describe, logs, and watch.
Read how Learn Docker in a Month of Lunches, Second Edition explains kubectl apply →
Kubernetes in Action, Second Edition
kubectl apply is a kubectl command that creates or updates Kubernetes objects from a manifest file or set of manifest files.
- How it is used
- Deploys and updates Kubernetes objects from manifest files, including Pods, namespaces, and multi-object applications.
- How deep it goes
- Explains command usage, repeated updates, multiple-file workflows, directory application, and immutable-field limitations without detailing apply internals.
- Examples
- Uses Pod manifests, a two-container Envoy Pod, namespace YAML, comma-separated files, and directory application.
- What you can do after
- Operate/configure Kubernetes applications by creating, updating, grouping, verifying, and removing manifest-defined objects.
Read how Kubernetes in Action, Second Edition explains kubectl apply →
Kubernetes for Developers
kubectl apply is a kubectl command that creates or updates Kubernetes resources from declarative configuration.
- How it is used
- Deploys declarative Kubernetes configuration for Secrets, Deployments, rolling updates, and blue/green releases.
- How deep it goes
- Demonstrates manifest-driven application and rollout sequences, but stops short of detailed command reference or API internals.
- Examples
- Uses Secret YAML, a timeserver Deployment, rolling-update settings, and blue/green Service-selector changes.
- What you can do after
- Operate/configure Kubernetes resources by editing YAML and applying changes for Secret creation and controlled application rollouts.
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
kubectl apply is a Kubernetes command that creates or updates cluster resources from declarative configuration files or manifests.
- How it is used
- Deploys microservices and infrastructure to local or production-like Kubernetes clusters from YAML manifests.
- How deep it goes
- Demonstrates manifest application, status validation, port checking, and repeated updates without detailing kubectl internals.
- Examples
- Uses a video-streaming microservice, FlixTube microservices, and MongoDB and RabbitMQ infrastructure as deployment examples.
- What you can do after
- Operate Kubernetes deployments by applying manifests, checking resource status, verifying service ports, and rolling out rebuilt images.
Road to Kubernetes
kubectl apply is a kubectl command that creates or updates Kubernetes resources from configuration manifests.
- How it is used
- Deploys Kubernetes application changes from manifests in an automated GitHub Actions workflow.
- 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 you can do after
- Operate/configure Kubernetes deployments by applying an apps/ manifest directory through kubectl.
Related concepts
- podproduces · A Kubernetes Pod is the smallest deployable unit in Kubernetes, grouping one or more co-located containers that share networking and other resources.
- Kubernetes manifestuses · A Kubernetes manifest is a declarative configuration document, typically written in YAML or JSON, that specifies Kubernetes resources and their desired state.
- shell scriptused by · Bash is a Unix command-line shell and scripting language for executing commands interactively and through scripts.
- ReplicaSetused by · A ReplicaSet is a Kubernetes workload resource that maintains a specified number of Pods matching a defined Pod template.
- MongoDBconfigures · MongoDB is a document-oriented database management system that stores data as BSON documents, typically organized into collections.
- Kubernetesproduces · Kubernetes is an open-source platform for orchestrating and automating the deployment, scaling, and management of containerized workloads across computing clusters.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.





