y4h2 / personal-notes

my personal notes
0 stars 0 forks source link

GCP managed Promethues #3

Open y4h2 opened 2 years ago

y4h2 commented 2 years ago

参考: Measure your golden signals with GKE Managed Prometheus and the nginx-ingress

部署测试组件

helm upgrade --install ingress-nginx ingress-nginx \
  --repo https://[kubernetes.github.io/ingress-nginx](http://kubernetes.github.io/ingress-nginx) \
  --namespace ingress-nginx --create-namespace \
  --set controller.metrics.enabled=true

部署PodMonitoring

apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
  name: ingress-nginx-metrics-monitoring
  namespace: ingress-nginx
spec:
  endpoints:
  - interval: 5s
    port: 10254
  selector:
    matchLabels:
      app.kubernetes.io/name): ingress-nginx

然后在GCP monitoring page上能看到对应的metrics image

y4h2 commented 2 years ago

用GCP官方example测试

y4h2 commented 2 years ago

GCP managed promethues doesn't work with istio. Once you enabled promethues managed promethues, it will create two namespace gmp-public and gmp-system. Those namespaces are not injected by istio.