Changes to default-backend deployment keep getting reset automatically

After updating my GKE cluster to Kubernetes 1.5.6, I’m having issues with the default-backend deployment. Every time I try to modify the replica count or CPU limits, the changes get automatically reverted back to the original settings.

I want to increase the replicas from 1 to 3 and boost the CPU limits beyond 10m, but the system keeps resetting these values. The weird thing is that when I add a nodeSelector configuration, that change actually sticks.

Here’s what I’m working with:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: default-backend
  namespace: kube-system
  labels:
    app: backend-service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: backend-service
  template:
    metadata:
      labels:
        app: backend-service
    spec:
      containers:
      - name: backend-container
        image: gcr.io/google_containers/defaultbackend:1.0
        ports:
        - containerPort: 8080
        resources:
          limits:
            cpu: 10m
            memory: 20Mi
          requests:
            cpu: 10m
            memory: 20Mi
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 30
          timeoutSeconds: 5
      nodeSelector:
        cloud.google.com/gke-nodepool: main-pool

Any ideas on how to make the scaling changes permanent?

GKE’s addon manager is causing this. It manages the default-backend deployment as a system component and enforces its own config for things like replicas and resource limits. When you change these values, the addon manager sees the drift and reverts them back to keep the cluster stable. Your nodeSelector change sticks because it doesn’t mess with the addon manager’s core requirements. Instead of fighting this, just create your own custom backend deployment with a different name. That way you can scale and set resources however you want without the addon manager constantly overriding your changes.

that’s weird… check if there’s an addon manager or controller handling that deployment. gke sometimes has background processes that override manual changes. try describing the deployment right after you make changes - what happens?