Skip to main content

Kubernetes Client-side Vs Server-side Apply

Aswin Vijayan
Aswin Vijayan
3 min read

Kubernetes offers two ways to apply changes to resources: Client-Side Apply (CSA) and Server-Side Apply (SSA).

Both can create or update resources from a manifest, but they handle the apply process differently.

Kubernetes Client-Side Vs Server-Side Apply

Let's look at how these apply strategies work.

Client-Side Apply

When you run kubectl apply, kubectl uses Client-Side Apply (CSA) by default.

Client-Side Apply means that kubectl itself decides what needs to change before sending the request to the Kubernetes API server.

To do this, kubectl compares three things:

  • The manifest you are applying now
  • The current resource running in the cluster
  • Configuration that was applied previously.

Based on these three, kubectl determines what needs to be added, changed, or removed and sends the required patch to the Kubernetes API server.

Once applied, the last applied configuration will be stored in the resource as an annotation, as shown below.

$ kubectl get po web-app -o yaml

apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"labels":{"app":"web"},"name":"web-app","namespace":"default"},"spec":{"containers":[{"image":"nginx:latest","name":"nginx-container"}]}}
.
.

This annotation is updated whenever you apply a new configuration.

This is why it is called Client-Side Apply. Most of the apply logic happens on the client side, inside kubectl.

Server-Side Apply

Server-Side Apply (SSA) works differently.

When you run kubectl apply with the --server-side flag,

kubectl apply -f deployment.yaml --server-side

The Kubernetes API server handles the apply process. But one of the main advantages of Server-Side Apply is that it uses field ownership information to detect conflicting changes.

💡
Field ownership means Kubernetes keeps track of which user, controller, or tool manages specific fields inside a resource.

Client-Side Apply also records field ownership in managedFields. But only Server-Side Apply checks this information before applying changes and reports a conflict if another manager owns the field.

For example, one controller may manage the container image, while another manages the replica count.

To view the managedFields, you need to use the --show-managed-fields flag with the get command.

The block below is an example of the managedFields in a pod.

$ kubectl get po web-app -o yaml --show-managed-fields

apiVersion: v1
kind: Pod
metadata:
.
.
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          f:app: {}
      f:spec:
        f:containers:
          k:{"name":"nginx-container"}:
            .: {}
            f:image: {}
            f:name: {}
    manager: kubectl
    operation: Apply
    time: "2026-10-15T11:49:09Z"

As shown in the example above, kubectl manages the label, container name, and image.

If two controllers try to apply different values to the same field, Server-Side Apply gives a conflict message instead of simply overwriting the other manager's value.

Avoiding Configuration Conflicts with Server-Side Apply

SSA becomes useful when the same Kubernetes resource is managed by multiple systems.

For example, a Deployment may be updated by a GitOps tool, a Kubernetes controller, and an engineer using kubectl.

With Server-Side Apply, Kubernetes uses field ownership information to detect conflicts between managers.

This allows different tools or controllers to safely manage different parts of the same resource.

For simple workloads managed by one workflow, Client-Side Apply is usually straightforward.

When multiple controllers, automation tools, or teams manage the same resources, Server-Side Apply provides much better ownership and conflict handling.

⚠️
If you intentionally want to override a Server-Side Apply conflict, you can use the --force-conflicts flag.
kubectl apply -f deploy.yaml --server-side --force-conflicts

This overwrites the conflicting value and transfers ownership of that field to the manager performing the apply, so it should be used carefully.

Subscribe to our newsletter