I'm trying to implement a functionality similar to kubectl apply
using Kazan, a kubernetes client in Elixir, and trying to understand how to perform a rolling update, in specifically the function replace_namespaced_deployment
.
Having REST as background, where CRUD are the verbs to manipulate resources, Kubernetes' 'replace' sounds to me like an UPDATE
, so I try to understand:
Short answer: yes
Long answer: There is no "update" command in Kubernetes. If you want to edit any parameters of a resource, you can edit the yaml file, then run:
kubectl replace -f FILE
Note that some resources will throw an error saying it is not possible t modify. In that case you will need to delete the resource and create it again.