IssueRaiser

Expected behavior for Deployment replicas with HPA during update

I am seeing unexpected behavior from a user standpoint when `kubectl apply -f mydeployment.yml` The existing Deployment has an HPA associated with it and the current replica count is 3. When the deployment is accepted, the number of replicas jumps to 9, then scales down to 6, the value in the deployment. Eventually, the new pods info starts flowing in and the HPA does its thing and scales back to satisfaction. The behavior I expected is that the rollout would use the current replicas from the HPA and the strategy parameters from the Deployment to keep replica count in line with the current target set by the HPA. k8s version: 1.2.3 ``` apiVersion: extensions/v1beta1 kind: Deployment metadata: name: mydeployment spec: replicas: 6 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: "40%" maxSurge: "50%" template: metadata: labels: app: myapp spec: containers: - name: myapp image: "someimage" ``` ``` apiVersion: extensions/v1beta1 kind: HorizontalPodAutoscaler metadata: name: mydeployment namespace: default spec: scaleRef: kind: Deployment name: mydeployment subresource: scale minReplicas: 3 maxReplicas: 12 cpuUtilization: targetPercentage: 50 ```

Posted by verdverm on May 6, 2016, 12:02 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

reliability (SaaS)

Expected behavior for Deployment replicas with HPA during update

verdvermMay 6, 2016, 12:02 AM

I am seeing unexpected behavior from a user standpoint when `kubectl apply -f mydeployment.yml` The existing Deployment has an HPA associated with it and the current replica count is 3. When the deployment is accepted, the number of replicas jumps to 9, then scales down to 6, the value in the deployment. Eventually, the new pods info starts flowing in and the HPA does its thing and scales back to satisfaction. The behavior I expected is that the rollout would use the current replicas from the HPA and the strategy parameters from the Deployment to keep replica count in line with the current target set by the HPA. k8s version: 1.2.3 ``` apiVersion: extensions/v1beta1 kind: Deployment metadata: name: mydeployment spec: replicas: 6 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: "40%" maxSurge: "50%" template: metadata: labels: app: myapp spec: containers: - name: myapp image: "someimage" ``` ``` apiVersion: extensions/v1beta1 kind: HorizontalPodAutoscaler metadata: name: mydeployment namespace: default spec: scaleRef: kind: Deployment name: mydeployment subresource: scale minReplicas: 3 maxReplicas: 12 cpuUtilization: targetPercentage: 50 ```

Comments (0)

No comments yet. Start the discussion.

Comment on this issue