forked from pryorda/vmware_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kubernetes deployment descriptor & instructions
- Loading branch information
1 parent
4b0d552
commit 8e48868
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app: vmware-exporter | ||
name: vmware-exporter-config | ||
apiVersion: v1 | ||
data: | ||
VSPHERE_USER: "<USER>" | ||
VSPHERE_HOST: "<HOST>" | ||
VSPHERE_IGNORE_SSL: "True" | ||
VSPHERE_COLLECT_HOSTS: "True" | ||
VSPHERE_COLLECT_DATASTORES: "True" | ||
VSPHERE_COLLECT_VMS: "True" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
# Vmware node exporter on kubernetes | ||
|
||
First edit the config.yml file to match your setup. | ||
Afterwards, using the read command interactively type in your password, | ||
then run the command to create your secret on the cluster. | ||
And finally deploy the exporter container. | ||
|
||
The pod has prometheus annotations so when there's a prometheus on the cluster it will auto scrape the pod. | ||
|
||
``` | ||
read -s VSPHERE_PASSWORD | ||
kubectl create secret generic vmware-exporter-password --from-literal=VSPHERE_PASSWORD=$VSPHERE_PASSWORD | ||
kubectl apply -f . | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: vmware-exporter | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: vmware-exporter | ||
template: | ||
metadata: | ||
labels: | ||
app: vmware-exporter | ||
release: vmware-exporter | ||
annotations: | ||
prometheus.io/path: "/metrics" | ||
prometheus.io/port: "9272" | ||
prometheus.io/scrape: "true" | ||
spec: | ||
containers: | ||
- name: vmware-exporter | ||
image: "pryorda/vmware_exporter:latest" | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 9272 | ||
name: http | ||
envFrom: | ||
- configMapRef: | ||
name: vmware-exporter-config | ||
- secretRef: | ||
name: vmware-exporter-password |