mirror of
https://github.com/nginxinc/nginx-prometheus-exporter.git
synced 2025-04-19 23:42:14 +03:00
NGINX Prometheus Exporter in Kubernetes
This example shows how to run NGINX Prometheus Exporter in a Kubernetes cluster.
Table of Contents
- Prerequisites
- Create a kind cluster
- Deploy the NGINX Hello application and NGINX Prometheus Exporter
- Configure port forwarding
- Verification
Prerequisites
Create a kind cluster
You can create a kind cluster with the following command:
kind create cluster
For details, see the kind documentation.
Deploy the NGINX Hello application and NGINX Prometheus Exporter
You can deploy the NGINX Hello application and NGINX Prometheus Exporter with the following command:
kubectl apply -f nginx-hello.yaml
Configure port forwarding
Port forwarding is used to access the NGINX Hello application and NGINX Prometheus Exporter from your local machine.
You can configure port forwarding with the following command:
kubectl port-forward service/nginx-demo 8080:80 9113:9113
Verification
You can access the NGINX Hello application at http://localhost:8080 and the NGINX Prometheus Exporter at http://localhost:9113.