Search code examples
kuberneteskubectlminikubeautoscalinghorizontal-pod-autoscaling

Kubernetes HPA changing sync period


I am trying to change the sync period as mentioned in the following k8s document. I found the file named kube-controller-manager.yaml in /etc/kubernetes/manifests. I changed the timeoutSeconds: value from 15 secs(default) to 60 secs. Now I have 2 questions based on above info:

    1. Is this the right way to change the sync period ? Cause I have read in the document that there is some flag named --horizontal-pod-autoscaler-sync-period, but adding that is also not working.
    1. And any changes made to the file kube-controller-manager.yaml are getting restored to default whenever I restart the minikube? what should I do? Please let me know any solution or any view in this.

Solution

  • To change the sync period you have to run following command while starting the minikube. minikube start --extra-config 'controller-manager.horizontal-pod-autoscaler-sync-period=10s'