You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+31-13
Original file line number
Diff line number
Diff line change
@@ -85,27 +85,45 @@ You can fail an ongoing deployment if there's been a new deployment by adding `-
85
85
kd will use the `apply` verb to create / update resources which is [appropriate
86
86
in most cases](https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources).
87
87
88
-
The flag `--replace` can be used to override this behaviour can be useful in
89
-
some very specific scenarios but the result is a [disruptive update](https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#disruptive-updates)
90
-
which should not be the default.
91
-
92
-
To have the desired affect when updating objects, `--force` is used to enable
93
-
creation of objects created with replace. **NOTE** history of an object is lost
94
-
with `--force`.
88
+
The flag `--replace` can be used to override this behaviour and may be useful in
89
+
some very specific scenarios however the result can be a [disruptive update](https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#disruptive-updates)
90
+
if extra kubectl flags are applied (such as `-- --force`). Additionally, the last-applied-configuration is not saved when using this flag.
95
91
96
92
#### Cronjobs
97
93
98
-
When a cronjob object is created and only updated, any old jobs will continue
99
-
and some fields are imutable so use of the force option may be required.
94
+
When a cronjob object is created and only updated, any old jobs will continue and some
95
+
fields are immutable, so use of the replace command and force option may be required.
100
96
101
-
E.g. to update a large cron job use `kd --replace -f cronjob.yml`.
97
+
```bash
98
+
# The cronjob resource does not yet exist, and so a create action is performed
99
+
$ kd --replace -f cronjob.yml -- --force
100
+
[INFO] 2018/08/07 22:54:00 main.go:724: resource does not exist, dropping --force flag for create action
0 commit comments