Skip to content

Commit

Permalink
Add documentation for server-side apply
Browse files Browse the repository at this point in the history
  • Loading branch information
smuth4 committed Dec 14, 2021
1 parent 1a518c1 commit 2b157fb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/docs/server-side-apply.md
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.

0 comments on commit 2b157fb

Please sign in to comment.