Its really a good video... I have been searching for vpa but did not fine any good one and finally got insight from this video ... Keep up the good work venkat 😀.
Venkat, awesome video! question about the autoscaler manifest itself, instead of creating individual VPA for each deployment, can you define multiple targetRef in the spec stanza for each additional deployment in that same VPA? Thanks in advance, keep up the good work!
Hi, I don't think you can have multiple targetRef sections in the VPA specification. I read through some documentations, and there were no mentions about multiple targets for autoscaling. Best to test it. Sure it will throw error. Thanks.
@@justmeandopensource no they have that repo helm repo add cowboysysop cowboysysop.github.io/charts/ helm install my-vertical-pod-autoscaler cowboysysop/vertical-pod-autoscaler --version 3.0.0 artifacthub.io/packages/helm/cowboysysop/vertical-pod-autoscaler
could you please help, iam getting this error Status: Conditions: Last Transition Time: 2022-11-06T22:13:41Z Message: Cannot read targetRef. Reason: Deployment kube-system/my-app does not exist Status: True Type: ConfigUnsupported Last Transition Time: 2022-11-06T22:13:41Z Message: No pods match this VPA object Reason: NoPodsMatched Status: True Type: NoPodsMatched Last Transition Time: 2022-11-06T22:13:41Z Message: No pods match this VPA object Reason: NoPodsMatched Status: False Type: RecommendationProvided Recommendation: Events: trying on k8s 1.25.3
Hi Mohan, thanks for watching. The error message says that it couldn't find a deployment named my-app. VPA resource act on the deployment that you specify but it couldn't find the deployment. Are you sure the deployment has been created and pods running?
Hi Leonardo, thanks for watching this video. I haven't looked at GitOps yet but many viewers asked for it. So soon I will learn and upload video. Cheers.
Hi Venkat. Thanks for the tutorial. I tried using the metrics-server in KIND (1master, 2 worker) cluster. kubectl top nodes (shows below errors) Default mode (no edit) "Error : metrics not available yet" with insecure-tls : Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io) Tried with helm charts too. Not able to fix.
Hi Srini, I had the same problem recently. Neither direct deployment nor helm deployment worked for metrics-server. I think its because the nodes are containers rather than complete machines, the metrics are not being collected. I then had to use vagrant environment to use metrics server. I will try it again this weekend and let you know if I succeed. Thanks.
Hi Venkat, awesome video! my question is that , actually approx i have done but one error showing .... Conditions: Last Transition Time: 2021-11-22T10:16:39Z Message: Cannot read targetRef. Reason: Unhandled targetRef apps/v1 / Rollout / my-rec-deployment, last error no matches for kind "Rollout" in group "apps" Status: True Type: ConfigUnsupported Last Transition Time: 2021-11-22T10:16:39Z Message: No pods match this VPA object Reason: NoPodsMatched Status: True Type: NoPodsMatched Last Transition Time: 2021-11-22T10:16:39Z Message: No pods match this VPA object Reason: NoPodsMatched Status: False Type: RecommendationProvided Recommendation:
I am doing a similar approach. I created a nodejs app that receives requests from a benchmark tool and generate cpu and mem utilization to trigger the vpa. Additionally I created a service manifest to expose my app using load balacer, also I pointed to the image of my app and removed "command" and "args" of the deployment file. When the load is generated I can see through the minikube dashboard that the cpu and mem usage is increasing and reaching the limit but the vpa doesn't recreate the conteiner with more resources. Any ideas?
Hi Kewyn, thanks for watching. When you create the VPA resource, have you changed the updatepolicy to either Auto or Recreate? In this video, I showed with UpdatePolicy set to Off which will show the recommendations but won't take any action on increasing the resource limits. Then changed the updatepolicy to auto to actually increase the resource limits under load.
@@justmeandopensourceI am testing it using minikube. Metrics-server is running fine. It is possible to be something related to the service load balancer?
Hi. Really nice explanation. But I am having problems right after running ./vpa-up.sh. My vpa-recommender pod is always in pending state. Like this: kube-system vpa-admission-controller-6d449d5876-sld4l 1/1 Running 0 19m 192.168.32.5 kworker kube-system vpa-recommender-6cb878fdc7-s6px8 0/1 Pending 0 19m kube-system vpa-updater-6c9d65dd6f-9dt4z 1/1 Running 0 19m 192.168.32.4 kworker Thanks !
Hi Abhinav, thanks for watching. Is there anything that you are doing differently to the steps in this video? If you are following the exact steps and seeing this issue, I can re-test this video. Otherwise your environment might be different to mine trying to reproduce. More information would be helpful. Cheers.
It is possible to test it using minikube? Because when I try to do the gcp tutorial for VPA I got an error: error: unable to recognize "my-rec-vpa.yaml": no matches for kind "VerticalPodAutoscaler" in version "autoscaling.k8s.io/v1"
Hi Kewyn, did you managed to get metrics-server working in your minikube environment? May I know how you installed metrics-server? Did you follow the step in this video or did you do "minikube addons enable metrics-server"? Is "kubectl top nodes" showing metrics? Thanks.
Hi Kewyn, I just tested it on my Minikube environment and its working perfectly fine. However you need to do one slight change in the vpa api version. When you deploy my-rec-vpa, use v1beta2 instead of v1. You can see more details of my testing in the below pastebin link. pastebin.com/DLMwNidf Please let me know if it worked. Thanks.
@@justmeandopensource when load goes down and container are not in much use ,does hpa recommendation get back to CPU 100m and memory 50mi and new pod if created has this configuration?
@@vishalvarshney961 I only tested hpa. In case of vpa, the controller will get a cpu/mem recommendation based on the current load and will modify the pods accordingly. You could test it yourself.
I ran into a problem, VPA keeps terminating old pods and creating a new pod with specified resource request instead of recommended request, it seems that vpa detected a pod doesn't have recommended resource request, but failed to transfer the recommended request to new pod. Any idea about the problem?
Hi Jiaxing, thanks for watching. I haven't encountered that issue yet unfortunately to be able to assist you. It must be your configurations thats causing this. Have you tried that with any other deployments? Is it happening to all deployments using VPA?
5 years later still such an informative video. Thanks! :)
@@preedie glad it is still being watched. 🙏
@@justmeandopensource There is no deploy folder in your metrics git hub repo? Can you please check?
loved the way you explain complex stuff in a very simplified manner that too hands on, highly appreciate it
Hi Rajiv, thanks for watching and taking time to comment/appreciate. Cheers.
Its really a good video... I have been searching for vpa but did not fine any good one and finally got insight from this video ... Keep up the good work venkat 😀.
Hi Diptendu, thanks for watching this video.
I have learned a lot. Thanks for the video!
Hi Danial, thanks for watching. Cheers 😊
Amazing and very useful video
Thanks
Hi Bharat, thanks for watching.
Hi Venkat, this is helpful. Thanks for the video!
You are welcome and thanks for watching this video.
it's really very good venkat,upto know i have knowledge on hpa only,thanks for posting this video,it's really help ful
Hi Kiran, thanks for watching. CHeers.
Venkat!!!, you are Awesome man!!!, SuperB explaination...
Hi Musufa, thanks for watching this video and taking time to comment/appreciate. Cheers.
Really great tutorial!!!! This is awesome Venkat!!
Hi Ararat, thanks for watching. Cheers
Hi, thanks for detail steps and i have followed everything but in VPA recommendations are not showing
Really great tutorial!!! Thanks Venkat.
Hi Prabhakar, thanks for watching. Cheers.
Nice explanation 👌👍
Thanks for watching.
Always enjoying k8s videos here....it's cool and amazing...so according to u which one would be preferable?
Do you mean vertical or horizontal? Each has its own usecase. Cheers.
Venkat, awesome video! question about the autoscaler manifest itself, instead of creating individual VPA for each deployment, can you define multiple targetRef in the spec stanza for each additional deployment in that same VPA? Thanks in advance, keep up the good work!
Hi, I don't think you can have multiple targetRef sections in the VPA specification. I read through some documentations, and there were no mentions about multiple targets for autoscaling. Best to test it. Sure it will throw error. Thanks.
Hi Venkat
Can you Please explan breafly about user creation in cluster and assining roles for them
Yeah I have that on my list. Cheers
Great one...
Hi Paresh, thanks for watching.
Its really a good video Can you please make a separate video using helm Thanks
Hi, thanks for watching. I don't think there is official helm chart for VPA.
@@justmeandopensource no they have that repo
helm repo add cowboysysop cowboysysop.github.io/charts/
helm install my-vertical-pod-autoscaler cowboysysop/vertical-pod-autoscaler --version 3.0.0
artifacthub.io/packages/helm/cowboysysop/vertical-pod-autoscaler
could you please help, iam getting this error
Status:
Conditions:
Last Transition Time: 2022-11-06T22:13:41Z
Message: Cannot read targetRef. Reason: Deployment kube-system/my-app does not exist
Status: True
Type: ConfigUnsupported
Last Transition Time: 2022-11-06T22:13:41Z
Message: No pods match this VPA object
Reason: NoPodsMatched
Status: True
Type: NoPodsMatched
Last Transition Time: 2022-11-06T22:13:41Z
Message: No pods match this VPA object
Reason: NoPodsMatched
Status: False
Type: RecommendationProvided
Recommendation:
Events:
trying on k8s 1.25.3
Hi Mohan, thanks for watching. The error message says that it couldn't find a deployment named my-app. VPA resource act on the deployment that you specify but it couldn't find the deployment. Are you sure the deployment has been created and pods running?
nice video man!! there's any content about git ops comming?
Hi Leonardo, thanks for watching this video. I haven't looked at GitOps yet but many viewers asked for it. So soon I will learn and upload video. Cheers.
Hi Venkat. Thanks for the tutorial. I tried using the metrics-server in KIND (1master, 2 worker) cluster.
kubectl top nodes (shows below errors)
Default mode (no edit) "Error : metrics not available yet"
with insecure-tls : Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)
Tried with helm charts too. Not able to fix.
Hi Srini, I had the same problem recently. Neither direct deployment nor helm deployment worked for metrics-server. I think its because the nodes are containers rather than complete machines, the metrics are not being collected. I then had to use vagrant environment to use metrics server. I will try it again this weekend and let you know if I succeed. Thanks.
Hi Venkat, awesome video! my question is that , actually approx i have done but one error showing .... Conditions:
Last Transition Time: 2021-11-22T10:16:39Z
Message: Cannot read targetRef. Reason: Unhandled targetRef apps/v1 / Rollout / my-rec-deployment, last error no matches for kind "Rollout" in group "apps"
Status: True
Type: ConfigUnsupported
Last Transition Time: 2021-11-22T10:16:39Z
Message: No pods match this VPA object
Reason: NoPodsMatched
Status: True
Type: NoPodsMatched
Last Transition Time: 2021-11-22T10:16:39Z
Message: No pods match this VPA object
Reason: NoPodsMatched
Status: False
Type: RecommendationProvided
Recommendation:
Hi Venkat,
i want to use manage secrets tool hashicorp vault install with HA node
can you make a video?
thakyou.
Hi Vatcharin, thanks for watching this video. Vault is on my list and will do a video soon. Cheers.
@@justmeandopensource thankyouu
@@vatcharinkongsakul4478 Sure. Thanks.
I am doing a similar approach. I created a nodejs app that receives requests from a benchmark tool and generate cpu and mem utilization to trigger the vpa. Additionally I created a service manifest to expose my app using load balacer, also I pointed to the image of my app and removed "command" and "args" of the deployment file. When the load is generated I can see through the minikube dashboard that the cpu and mem usage is increasing and reaching the limit but the vpa doesn't recreate the conteiner with more resources. Any ideas?
stackoverflow.com/questions/59850612/vertical-pod-autoscaler-not-working-when-receiving-load-from-a-benchmark-tool
Hi Kewyn, thanks for watching. When you create the VPA resource, have you changed the updatepolicy to either Auto or Recreate? In this video, I showed with UpdatePolicy set to Off which will show the recommendations but won't take any action on increasing the resource limits. Then changed the updatepolicy to auto to actually increase the resource limits under load.
@@justmeandopensource Yes, I did it. I copied and pasted everything on Stackovflw. It is defined as "Auto" but not nothing happens.
@@kewynakshlley Hmm strange. Can you try it on a different cluster? Is metrics server running fine?
@@justmeandopensourceI am testing it using minikube. Metrics-server is running fine. It is possible to be something related to the service load balancer?
very useful...
Thanks for watching.
I want to use HPA on rabbitmq queue using custom metrics.
I tried, but could not deploy it properly..
Can you look into that?
Hi Ashutosh, thanks for watching this video. I haven't tried auto-scaling based on custom metrics yet. I will do that one soon. Cheers.
@@justmeandopensource I will be waiting for that video.😊
@@ashutoshojha Cheers.
I will be waiting too xD
@@kewynakshlley Cheers.. Thanks for watching.
Hi. Really nice explanation. But I am having problems right after running ./vpa-up.sh. My vpa-recommender pod is always in pending state. Like this:
kube-system vpa-admission-controller-6d449d5876-sld4l 1/1 Running 0 19m 192.168.32.5 kworker
kube-system vpa-recommender-6cb878fdc7-s6px8 0/1 Pending 0 19m
kube-system vpa-updater-6c9d65dd6f-9dt4z 1/1 Running 0 19m 192.168.32.4 kworker
Thanks !
Hi Abhinav, thanks for watching. Is there anything that you are doing differently to the steps in this video? If you are following the exact steps and seeing this issue, I can re-test this video. Otherwise your environment might be different to mine trying to reproduce. More information would be helpful. Cheers.
It is possible to test it using minikube? Because when I try to do the gcp tutorial for VPA I got an error: error: unable to recognize "my-rec-vpa.yaml": no matches for kind "VerticalPodAutoscaler" in version "autoscaling.k8s.io/v1"
Hi Kewyn, did you managed to get metrics-server working in your minikube environment? May I know how you installed metrics-server? Did you follow the step in this video or did you do "minikube addons enable metrics-server"?
Is "kubectl top nodes" showing metrics?
Thanks.
Hi Kewyn, I just tested it on my Minikube environment and its working perfectly fine. However you need to do one slight change in the vpa api version. When you deploy my-rec-vpa, use v1beta2 instead of v1.
You can see more details of my testing in the below pastebin link.
pastebin.com/DLMwNidf
Please let me know if it worked.
Thanks.
@@justmeandopensource I did it and now it is working fine. Thank you!
@@kewynakshlley Cool.
When load becomes down, does it scale down to original CPU and memory?
What do you mean by original cpu and memory?
@@justmeandopensource when load goes down and container are not in much use ,does hpa recommendation get back to CPU 100m and memory 50mi and new pod if created has this configuration?
@@vishalvarshney961 I only tested hpa. In case of vpa, the controller will get a cpu/mem recommendation based on the current load and will modify the pods accordingly. You could test it yourself.
I ran into a problem, VPA keeps terminating old pods and creating a new pod with specified resource request instead of recommended request, it seems that vpa detected a pod doesn't have recommended resource request, but failed to transfer the recommended request to new pod. Any idea about the problem?
Hi Jiaxing, thanks for watching. I haven't encountered that issue yet unfortunately to be able to assist you. It must be your configurations thats causing this. Have you tried that with any other deployments? Is it happening to all deployments using VPA?
Hi, I have a this error: metrics-server-775577f8dc-mdmk4 0/1 Error 3 3m7s
I execute: kubectl -n kube-system logs metrics-server-775577f8dc-mdmk4
this error: I1214 21:23:45.230478 1 serving.go:312] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
Error: Get 10.96.0.1:443/api/v1/namespaces/kube-system/configmaps/extension-apiserver-authentication: dial tcp 10.96.0.1:443: i/o timeout
Okay. Could you please wait for one more week. I am going to release another video on how to deploy metrics-server using Helm.
It worked, my problem was that I was working with version 3.6, I change the metricas version to 3.4, and it ok worked, Thanks!
@@VinuezaDario Glad that you got it resolved. Cheers.