|
| 1 | +# Kube Summary Exporter Helm Chart |
| 2 | + |
| 3 | +This Helm chart deploys kube-summary-exporter on a Kubernetes cluster using the Helm package manager. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Kubernetes 1.16+ |
| 8 | +- Helm 3.0+ |
| 9 | +- RBAC enabled cluster (for ServiceAccount and ClusterRole) |
| 10 | + |
| 11 | +## Installation |
| 12 | + |
| 13 | +From this directory: |
| 14 | + |
| 15 | +```bash |
| 16 | +# Install the chart |
| 17 | +helm install kube-summary-exporter ./kube-summary-exporter --namespace monitoring --create-namespace |
| 18 | + |
| 19 | +# Or use the Makefile |
| 20 | +make install |
| 21 | +``` |
| 22 | + |
| 23 | +## Configuration |
| 24 | + |
| 25 | +The following table lists the configurable parameters of the kube-summary-exporter chart and their default values. |
| 26 | + |
| 27 | +| Parameter | Description | Default | |
| 28 | +|-----------|-------------|---------| |
| 29 | +| `replicaCount` | Number of replicas | `1` | |
| 30 | +| `image.repository` | Container image repository | `quay.io/utilitywarehouse/kube-summary-exporter` | |
| 31 | +| `image.pullPolicy` | Container image pull policy | `IfNotPresent` | |
| 32 | +| `image.tag` | Container image tag | `"latest"` | |
| 33 | +| `service.type` | Kubernetes service type | `ClusterIP` | |
| 34 | +| `service.port` | Service port | `9779` | |
| 35 | +| `config.listenAddress` | Address to listen on for HTTP requests | `":9779"` | |
| 36 | +| `config.kubeconfig` | Path to kubeconfig file (empty for in-cluster) | `""` | |
| 37 | +| `rbac.create` | Create RBAC resources | `true` | |
| 38 | +| `serviceAccount.create` | Create service account | `true` | |
| 39 | +| `serviceMonitor.enabled` | Create ServiceMonitor for Prometheus Operator | `true` | |
| 40 | +| `serviceMonitorNodes.enabled` | Create ServiceMonitor for /nodes endpoint | `true` | |
| 41 | + |
| 42 | +### ServiceMonitor Configuration |
| 43 | + |
| 44 | +The chart includes two ServiceMonitors for Prometheus Operator: |
| 45 | + |
| 46 | +1. **serviceMonitor**: Scrapes `/metrics` endpoint (exporter metrics) |
| 47 | +2. **serviceMonitorNodes**: Scrapes `/nodes` endpoint (Kubernetes summary metrics) |
| 48 | + |
| 49 | +Both ServiceMonitors are configured with the label `release: kube-prom-stack` by default. Update `serviceMonitor.additionalLabels.release` to match your Prometheus Operator release name. |
| 50 | + |
| 51 | +## Usage Examples |
| 52 | + |
| 53 | +### Custom Values Installation |
| 54 | + |
| 55 | +Create a `values.yaml` file: |
| 56 | + |
| 57 | +```yaml |
| 58 | +image: |
| 59 | + tag: "v1.0.0" |
| 60 | + |
| 61 | +resources: |
| 62 | + limits: |
| 63 | + cpu: 100m |
| 64 | + memory: 128Mi |
| 65 | + requests: |
| 66 | + cpu: 50m |
| 67 | + memory: 64Mi |
| 68 | + |
| 69 | +serviceMonitor: |
| 70 | + additionalLabels: |
| 71 | + release: my-prometheus |
| 72 | + |
| 73 | +nodeSelector: |
| 74 | + kubernetes.io/os: linux |
| 75 | +``` |
| 76 | +
|
| 77 | +Install with custom values: |
| 78 | +
|
| 79 | +```bash |
| 80 | +helm install kube-summary-exporter ./kube-summary-exporter -f values.yaml --namespace monitoring --create-namespace |
| 81 | +``` |
| 82 | + |
| 83 | +### Disable ServiceMonitors |
| 84 | + |
| 85 | +If you don't use Prometheus Operator: |
| 86 | + |
| 87 | +```bash |
| 88 | +helm install kube-summary-exporter ./kube-summary-exporter \ |
| 89 | + --set serviceMonitor.enabled=false \ |
| 90 | + --set serviceMonitorNodes.enabled=false \ |
| 91 | + --namespace monitoring --create-namespace |
| 92 | +``` |
| 93 | + |
| 94 | +## Accessing the Application |
| 95 | + |
| 96 | +After installation, you can access the kube-summary-exporter using port-forward: |
| 97 | + |
| 98 | +```bash |
| 99 | +export POD_NAME=$(kubectl get pods --namespace monitoring -l "app.kubernetes.io/name=kube-summary-exporter" -o jsonpath="{.items[0].metadata.name}") |
| 100 | +kubectl --namespace monitoring port-forward $POD_NAME 9779:9779 |
| 101 | +``` |
| 102 | + |
| 103 | +Then visit: |
| 104 | +- http://localhost:9779/ - Home page |
| 105 | +- http://localhost:9779/nodes - Metrics for all nodes |
| 106 | +- http://localhost:9779/node/{node-name} - Metrics for specific node |
| 107 | +- http://localhost:9779/metrics - Exporter metrics |
| 108 | + |
| 109 | +## Available Commands (Makefile) |
| 110 | + |
| 111 | +From the helm directory, you can use: |
| 112 | + |
| 113 | +```bash |
| 114 | +make lint # Lint the Helm chart |
| 115 | +make template # Render templates for debugging |
| 116 | +make install # Install the chart |
| 117 | +make upgrade # Upgrade the chart |
| 118 | +make uninstall # Uninstall the chart |
| 119 | +make package # Package the chart |
| 120 | +make dry-run # Dry run installation |
| 121 | +make show-values # Show chart values |
| 122 | +make show-chart # Show chart info |
| 123 | +make test # Test the release |
| 124 | +make status # Get release status |
| 125 | +make list # List releases |
| 126 | +``` |
| 127 | + |
| 128 | +## Troubleshooting |
| 129 | + |
| 130 | +### ServiceMonitor Not Picked Up |
| 131 | + |
| 132 | +If Prometheus isn't discovering your ServiceMonitor: |
| 133 | + |
| 134 | +1. Check your Prometheus serviceMonitorSelector labels: |
| 135 | + ```bash |
| 136 | + kubectl get prometheus -o yaml | grep -A 10 serviceMonitorSelector |
| 137 | + ``` |
| 138 | + |
| 139 | +2. Ensure the `release` label matches your Prometheus release name: |
| 140 | + ```yaml |
| 141 | + serviceMonitor: |
| 142 | + additionalLabels: |
| 143 | + release: your-prometheus-release-name |
| 144 | + ``` |
| 145 | +
|
| 146 | +3. Verify namespace permissions and RBAC for Prometheus |
| 147 | +
|
| 148 | +### Pod Not Starting |
| 149 | +
|
| 150 | +Check the logs: |
| 151 | +```bash |
| 152 | +kubectl logs -n monitoring deployment/kube-summary-exporter |
| 153 | +``` |
| 154 | + |
| 155 | +Common issues: |
| 156 | +- RBAC permissions (check ServiceAccount and ClusterRole) |
| 157 | +- Image pull issues (check imagePullSecrets) |
| 158 | +- Resource constraints |
| 159 | + |
| 160 | +## Metrics Exposed |
| 161 | + |
| 162 | +The exporter provides detailed Kubernetes node and container metrics including: |
| 163 | + |
| 164 | +- Container logs filesystem usage |
| 165 | +- Container rootfs usage |
| 166 | +- Node runtime ImageFS usage |
| 167 | +- Pod ephemeral storage usage |
| 168 | + |
| 169 | +See the [main README](../README.md) for a complete list of available metrics. |
| 170 | + |
| 171 | +## Development |
| 172 | + |
| 173 | +To contribute to this chart: |
| 174 | + |
| 175 | +1. Make changes to templates or values |
| 176 | +2. Test with `helm template` and `helm lint` |
| 177 | +3. Verify installation works in a test cluster |
| 178 | +4. Update this README if adding new configuration options |
| 179 | + |
| 180 | +## License |
| 181 | + |
| 182 | +This chart is part of the kube-summary-exporter project. See the main repository for license information. |
0 commit comments