Kubectl apply: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
  cat <manifest.yaml> | kubectl apply -f -
  cat <manifest.yaml> | kubectl apply -f -


<tt>kubectl apply</tt> supports [[Kubernetes Strategic Merge Patch|strategic merge patch]].
The command can be used to both create a new resource or update the state of an existing resource. When updating the state, the command supports [[Kubernetes Strategic Merge Patch|strategic merge patch]].

Revision as of 20:44, 29 January 2020

Internal

Overview

Apply a configuration to a resource by filename or stdin:

kubectl apply -f <manifest.yaml>
cat <manifest.yaml> | kubectl apply -f -

The command can be used to both create a new resource or update the state of an existing resource. When updating the state, the command supports strategic merge patch.