Difference between revisions of "Kubectl apply"

From wikieduonline
Jump to navigation Jump to search
Line 25: Line 25:
 
* <code>[[kubectl create]]</code>
 
* <code>[[kubectl create]]</code>
 
* <code>[[kubectl edit]]</code>
 
* <code>[[kubectl edit]]</code>
 +
* <code>[[kubectl run]]</code>
  
 
== See also ==
 
== See also ==

Revision as of 16:46, 17 July 2021

Apply a configuration to a resource by filename or stdin[1]


  • kubectl apply -k
  • kubectl apply --dry-run=server
kubectl apply -f https://k8s.io/examples/application/mysql/mysql-pv.yaml
persistentvolume/mysql-pv-volume created
persistentvolumeclaim/mysql-pv-claim created
kubectl apply -f ./file.yaml
Error from server (InternalError): error when creating "./file.yaml": Internal error occurred: failed calling webhook "virtualmachines- mutator.kubevirt.io": Post https://virt-api.kubevirt.svc:443/virtualmachines-mutate?timeout=30s: service "virt-api" not found


Activities

Related commans

See also

  • https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply
  • Advertising: