logo
down
shadow

Is there a way to get the Kubernetes version using Prometheus API?


Is there a way to get the Kubernetes version using Prometheus API?

By : Ravi
Date : November 20 2020, 04:01 AM
I hope this helps you . With prometheus you shoul be able to get the info of your cluster using the kubernetes_build_info metric.
code :


Share : facebook icon twitter icon
Prometheus - Kubernetes RBAC

Prometheus - Kubernetes RBAC


By : Hentix
Date : March 29 2020, 07:55 AM
like below fixes the issue As per discussion on @JorritSalverda's ticket; https://github.com/prometheus/prometheus/issues/2606#issuecomment-294869099
Since GKE doesn't allow you to get to client certificates that would allow you to authenticate yourself with the kubelet, the best solution for users on GKE seems to use the kubernetes API server as a proxy requests to nodes.
code :
relabel_configs:
- action: labelmap
  regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
  replacement: kubernetes.default.svc.cluster.local:443
- target_label: __scheme__
  replacement: https
- source_labels: [__meta_kubernetes_node_name]
  regex: (.+)
  target_label: __metrics_path__
  replacement: /api/v1/nodes/${1}/proxy/metrics
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: prometheus
rules:
- apiGroups: [""]
  resources:
  - nodes
  - nodes/proxy
  - services
  - endpoints
  - pods
  verbs: ["get", "list", "watch"]
how to integrate prometheus on kubernetes cluster?

how to integrate prometheus on kubernetes cluster?


By : manideepkoppula
Date : March 29 2020, 07:55 AM
I hope this helps you . I am running the cluster on AWS, the following tutorials work for me https://itnext.io/kubernetes-monitoring-with-prometheus-in-15-minutes-8e54d1de2e13. Let see if you can adapt it. Basicallly, I used helm to install coreos/kube-prometheus.
# initialize tiller account kubectl create serviceaccount -n kube-system tiller kubectl create clusterrolebinding tiller-binding --clusterrole=cluster-admin --serviceaccount kube-system:tiller helm init --service-account tiller # install Prometheus app sleep 1m helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ helm install coreos/prometheus-operator --name prometheus-operator --namespace monitoring helm install coreos/kube-prometheus --name kube-prometheus --namespace monitoring --set global.rbacEnable=true --set prometheus.resources.requests.memory=300Mi # forward ports kubectl port-forward -n monitoring prometheus-kube-prometheus-0 9090 & kubectl port-forward $(kubectl get pods --selector=app=kube-prometheus-grafana -n monitoring --output=jsonpath="{.items..metadata.name}") -n monitoring 3000 & kubectl port-forward -n monitoring alertmanager-kube-prometheus-0 9093 &
Monitoring Kubernetes with Grafana: lots of missing data with latest Prometheus version

Monitoring Kubernetes with Grafana: lots of missing data with latest Prometheus version


By : Imam Lotfi
Date : March 29 2020, 07:55 AM
Hope this helps The Prometheus node exporter changed a lot of the metric names in the 0.16.0 version to conform to new naming conventions.
From https://github.com/prometheus/node_exporter/releases/tag/v0.16.0:
Prometheus is not compatible with Kubernetes v1.16

Prometheus is not compatible with Kubernetes v1.16


By : user3330254
Date : March 29 2020, 07:55 AM
like below fixes the issue
Kubernetes 1.16 removes the labels pod_name and container_name from cAdvisor metrics, duplicates of pod and container.
How to use Prometheus in Kubernetes with AWS EBS?

How to use Prometheus in Kubernetes with AWS EBS?


By : High Power
Date : March 29 2020, 07:55 AM
wish of those help When EBS is created, it is provisioned in a particular AZ and it can not be cross-zone mounted. If you do not have nodes available in the same zone for scheduling the pod, it will not start.
Another thing is that with a properly configured kube cluster, you should not need to create PV on your own at all, just create PVC and let dynamic provisioning do it's thing.
shadow
Privacy Policy - Terms - Contact Us © bighow.org