Difference between revisions of "Kubectl apply"
Jump to navigation
Jump to search
↑ https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply
Line 23: | Line 23: | ||
persistentvolume/mysql-pv-volume created | persistentvolume/mysql-pv-volume created | ||
persistentvolumeclaim/mysql-pv-claim created | persistentvolumeclaim/mysql-pv-claim created | ||
− | |||
− | |||
− | |||
− | |||
== Activities == | == Activities == | ||
Line 33: | Line 29: | ||
== Errors == | == Errors == | ||
<code>[[Cannot unmarshal XXXXX into Go struct field]]</code> | <code>[[Cannot unmarshal XXXXX into Go struct field]]</code> | ||
+ | |||
+ | 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 | ||
== Related commands == | == Related commands == |
Revision as of 12:02, 9 August 2023
kubectl apply
apply a configuration to a resource by filename or stdin
[1]
kubectl apply -f your.yaml -n your-namespace
kubectl apply --dry-run=server
kubectl apply --server-side
- Dashboard:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
- Istio install:
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl apply -f https://k8s.io/examples/application/mysql/mysql-pv.yaml persistentvolume/mysql-pv-volume created persistentvolumeclaim/mysql-pv-claim created
Contents
Activities
Errors
Cannot unmarshal XXXXX into Go struct field
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
Related commands
See also
kubectl apply, --server-side, -k, -f, creationTimestamp, kubectl.kubernetes.io/last-applied-configuration, --validate=false
Advertising: