Kubernetes metrics-server Error – Readiness probe failed: HTTP probe failed with statuscode

$  kubectl get pods --all-namespaces
NAMESPACE     NAME                                      READY   STATUS    RESTARTS   AGE
kube-system   coredns-558bd4d5db-h4968                  1/1     Running   0          18m
kube-system   coredns-558bd4d5db-klb5t                  1/1     Running   0          18m
kube-system   etcd-ip-172-31-12-77                      1/1     Running   0          18m
kube-system   kube-apiserver-ip-172-31-12-77            1/1     Running   0          18m
kube-system   kube-controller-manager-ip-172-31-12-77   1/1     Running   0          18m
kube-system   kube-proxy-5p7gr                          1/1     Running   0          18m
kube-system   kube-scheduler-ip-172-31-12-77            1/1     Running   0          18m
kube-system   metrics-server-6dfddc5fb8-vllgm           0/1     Running   0          17m
kube-system   weave-net-gqrtg                           2/2     Running   0          18m
root@ip-172-31-12-77:/home/ubuntu#
$ kubectl describe pod metrics-server-6dfddc5fb8-vllgm -n=kube-system
  Normal   Created           16m                 kubelet            Created container metrics-server
  Normal   Started           16m                 kubelet            Started container metrics-server
  Warning  Unhealthy         62s (x89 over 15m)  kubelet            Readiness probe failed: HTTP probe failed with statuscode: 500


$ kubectl logs deployment/metrics-server -n kube-system

E0713 16:52:04.774647       1 scraper.go:139] "Failed to scrape node" err="Get \"https://172.31.12.77:10250/stats/summary?only_cpu_and_memory=true\": x509: cannot validate certificate for 172.31.12.77 because it doesn't contain any IP SANs" node="ip-172-31-12-77"
172.31.12.77

Solution:

- Download https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
- Modify and add "- --kubelet-insecure-tls" in deployment.spec.template.spec.containers.args
- kubectl apply -f components.yaml
- kubectl top nodes
- kubectl top  pod kube-proxy-5p7gr -n=kube-system

Reference

  • https://stackoverflow.com/questions/64767239/kubernetes-metrics-server-not-running

Which is better for automation: Ansible, Chef or Puppet?

Many organizations are increasingly adopting the new collaborative culture in a way to achieve a competitive edge in modern IT domain.

Recent studies shows that the global DevOps market size reached USD 5.8 billion in 2021 and is projected to attain USD 14.97 billion by 2026 with a CAGR of 19.1% during the forecast period.

There are a number of latest DevOps configuration tools such as Chef, Puppet, and Ansible with various features available in the market. So, there is an inevitable need for the comparison of various configuration tools to identify the best tool for the success of DevOps projects.

What is Ansible?

Ansible is a latest configuration management tool which makes configuration management and coordination system of computer very easy to user.

What is Puppet?

Puppet is the oldest version of configuration management system and hard to understand for user.

What is Chef?

Chef is newer than Puppet but older version than Ansible so it is easier than Puppet but not than Ansible configuration system.

Here we do comparison of the top configuration tools including Ansible, Puppet and Chef:

First of all these tools are simple to use and robust capabilities to automate complex multi-tier IT application environment.

The differences between Ansible, Chef and Puppet are portrayed on the basis of different factors including Availability, Configuration Language, Setup and Installation, Ease of Management, Scalability, Interoperability, Tool Capabilities and Pricing:

IT departments with a strong DevOps workflow deploy software 200 times more frequently, with 2,555 times faster lead times, recover 24 times faster, and have three times lower change failure rates.

Conclusion

As you can see above, chef and puppet are the old players with the time whereas Ansible is new players in the market, and Ansible looks very promising with the growing trend. So, to conclude, all the three tools have their own advantages and categories in which they are better than the other. My only intention here is to help you in your decision making. So, it is necessary that you choose the appropriate tool which can be fitted according to your needs.

If you want to know more about Ansible, you can check out this blog on Ansible, Puppet and Chef with complete information.

If you are curious to learn and make a good career with this skill then I would suggest you please check out DevOpsschool.com.

Tagged : / / / / / /