kubectl apply
The kubectl command that creates or updates Kubernetes objects to match the manifests you give it.
In more detail
It is the typical push-model deploy step. A GitOps controller performs the equivalent continuously from Git instead.
Examples
kubectl apply -f deploy/production.yamlkubectl apply -f web-deployment.yamlRelated terms
- kubectl — The command-line tool for talking to a Kubernetes cluster's API server: creating, reading, changing and deleting objects.
- Kubernetes manifest — A YAML or JSON file that describes one or more Kubernetes objects, ready to be sent to the cluster with kubectl apply.
- push model — An arrangement where a central machine sends changes out to the hosts when someone runs it, as Ansible does.
- declarative configuration — Describing the end result you want in files and letting a tool work out the steps, rather than typing each step as a command.
- dry run — Sending a real request in a check-only mode, so the system reports whether it would succeed without actually making the change.
Taught in
- DORA Metrics: Measuring Your Pipeline — Continuous Integration & Continuous Delivery Pipelines
- The Push Model vs. The Pull Model — Continuous Integration & Continuous Delivery Pipelines
- Two Hours, Twenty Tasks: Exam Strategy — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Choose The Right Workload Resource — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Sidecars And Init Containers — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Persistent And Ephemeral Volumes — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Jobs And CronJobs That Behave — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Design And Build: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Blue/Green With Labels And A Service — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Canary Releases From Replica Counts — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Helm: Install, Upgrade And Roll Back — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Kustomize Bases, Overlays And Patches — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Deployment: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- API Deprecations And Migrations — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Observability: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- ConfigMaps And Secrets — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Requests, Limits And Quotas — Certified Kubernetes Application Developer (CKAD) Exam Prep
- ServiceAccounts And Tokens — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Authentication, Authorisation And Admission — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Configuration And Security: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Services And Empty Endpoints — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Services And Networking: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Mock Exam: Sixteen Tasks Against The Clock — Certified Kubernetes Application Developer (CKAD) Exam Prep
- From Docker To Desired State — Kubernetes: Production-Grade Container Orchestration
- Control Plane: etcd, API Server, Scheduler, Controllers — Kubernetes: Production-Grade Container Orchestration
- Worker Nodes: kubelet, Runtime, CNI And kube-proxy — Kubernetes: Production-Grade Container Orchestration
- Namespaces, Labels And Declarative Manifests — Kubernetes: Production-Grade Container Orchestration
- Pod Security Admission And Pod Security Standards — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: Forbidden Requests And Admission Rejections — Kubernetes: Production-Grade Container Orchestration