Is it possible to modify a live Kubernetes manifest, on-the-fly and non-interactively? I know kubectl edit
allows for this behavior, but this requires user interaction in an editor that is opened when the command is invoked. I need to be able to do this without user interaction (for example in a script, etc.). Is this possible with a simple command - perhaps a variation of kubectl edit
?
CodePudding user response:
The whole Kubernetes is built around APIs. You can e.g. use any http client to interact with the REST API directly, if you want.
You can also create or modify Kubernetes manifest files in plain Yaml text files, and apply them using the kubectl
CLI or any http client.
CodePudding user response:
Maybe it would be easier to deploy them using helm. You'd have to make a template for the deployment, but you can easily update and rollback to specific versions of a chart that has specific values.