k8s update-deployment
Update k8s deployment
Description
Update k8s deployment with the provided labels and annotations
Synopsis
k8s update-deployment
[--site <site>]
[--cluster <cluster>]
[--namespace|-n <namespace>]
<name>
[--labels <labels>]
[--annotations <annotations>]
[--resources <resources>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Cluster where this command will be executed
Example: --cluster "in-cluster"
Default: in-cluster
Attributes: optional
namespace
- (string)
Kubernetes namespace
Example: --namespace "namespace-1"
Default: default
Attributes: optional
name
- (string)
Name of the deployment to be updated
Example: "name-1"
Default: _None_
Attributes: required
labels
- (string)
labels that are to be merged with existing ones
Example: --labels "{"key1":"value1"}"
Default: _None_
Attributes: optional
annotations
- (string)
annotations that are to be merged with existing ones
Example: --annotations "{"key1":"value1"}"
Default: _None_
Attributes: optional
resources
- (string)
To modify resource requirements on deployment
Example: --resources "{"container1": {"limit": { "cpu": "value", "memory": "value" },"requests": { "cpu": "value", "memory": "value" }}}"
Default: _None_
Attributes: optional, multiple allowed
Examples
Input:
! k8s update-deployment --labels '{"abc":"def"}' --annotations '{"ghi":"jkl"}' "kafka3" --resources '{"container1": {"limit": { "cpu": "0.2", "memory": "20" },"requests": { "cpu": "0.2", "memory": "20" }}}'
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "update" |
Service Type | "k8s" |
Service Instance | cluster |
Namespace | namespace |
Object Type | "deployment" |
Object ID | name |
Please see Access Control for details.