-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for server-side apply
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: "Server-Side Apply" | ||
route: "/server-side-applye" | ||
menu: Advanced features | ||
--- | ||
|
||
# Server-Side Apply | ||
|
||
Tanka supports [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/), | ||
which requires at least Kubernetes 1.16+, and was promoted to stable status in 1.22. | ||
|
||
To enable server-side diff in tanka, add the following field to `spec.json`: | ||
|
||
```diff | ||
{ | ||
"spec": { | ||
+ "applyStrategy": "server", | ||
} | ||
} | ||
``` | ||
|
||
While server-side apply doesn't have any effect on the resources being applied | ||
and is intended to be a general in-place upgrade to client-side apply, there are | ||
differences in how fields are managed that can make converting existing cluster | ||
resources a non-trival change. | ||
|
||
Identifying and fixing these changes are beyond the scope of this guide, but | ||
many can be found before an apply with the `validate` | ||
[diff strategy](/diff-strategy). | ||
|
||
## Field conflicts | ||
|
||
As part of the changes, you may encounter error messages which | ||
recommend the use of the `--force-conflicts` flag. Using `tk apply --force` | ||
in server-side mode will enable that flag for kubectl instead of | ||
`kubectl --force`, which no longer has any effect in server-side mode. |