For example, my Route 53 Hosted Zone is myzone.com
. Created a Kubernetes cluster by kops with cluster full name: earth.myzone.com
.
I tried to install Prometheus this way:
helm install prometheus \
--set alertmanager.ingress.enabled=true \
--set alertmanager.ingress.hosts=[alertmanager.earth.myzone.com] \
--set pushgateway.ingress.enabled=true \
--set pushgateway.ingress.hosts=[pushgateway.earth.myzone.com] \
--set server.ingress.enabled=true \
--set server.ingress.hosts=[server.earth.myzone.com]
Got error:
zsh: no matches found: alertmanager.ingress.hosts=[alertmanager.earth.myzone.com]
Or name the subdomain under myzone.com
?
helm install prometheus \
--set alertmanager.ingress.enabled=true \
--set alertmanager.ingress.hosts=[alertmanager.myzone.com] \
--set pushgateway.ingress.enabled=true \
--set pushgateway.ingress.hosts=[pushgateway.myzone.com] \
--set server.ingress.enabled=true \
--set server.ingress.hosts=[server.myzone.com]
Also the same error.
If deploy an application by deployment and service manifest files with ELB, create a DNS record is necessary like aws route53 change-resource-record-sets ...
first. Then url will like:
app.earth.myzone.com
But if want to deploy Prometheus
only, how to do?
Use @fiunchinho 's method to run again, successfully completed:
$ helm install prometheus \
> --set alertmanager.ingress.enabled=true \
> --set "alertmanager.ingress.hosts={alertmanager.earth.myzone.com}" \
> --set pushgateway.ingress.enabled=true \
> --set "pushgateway.ingress.hosts={pushgateway.earth.myzone.com}" \
> --set server.ingress.enabled=true \
> --set "server.ingress.hosts={server.earth.myzone.com}"
NAME: auxilliary-pronghorn
E0129 01:41:06.224401 15782 portforward.go:303] error copying from remote stream to local connection: readfrom tcp4 127.0.0.1:42993->127.0.0.1:55840: write tcp4 127.0.0.1:42993->127.0.0.1:55840: write: broken pipe
LAST DEPLOYED: Mon Jan 29 01:41:05 2018
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
auxilliary-pronghorn-prometheus-alertmanager ClusterIP 100.68.246.60 <none> 80/TCP 1s
auxilliary-pronghorn-prometheus-kube-state-metrics ClusterIP None <none> 80/TCP 1s
auxilliary-pronghorn-prometheus-node-exporter ClusterIP None <none> 9100/TCP 1s
auxilliary-pronghorn-prometheus-pushgateway ClusterIP 100.69.211.226 <none> 9091/TCP 1s
auxilliary-pronghorn-prometheus-server ClusterIP 100.71.5.220 <none> 80/TCP 1s
==> v1beta1/DaemonSet
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
auxilliary-pronghorn-prometheus-node-exporter 2 2 0 2 0 <none> 0s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
auxilliary-pronghorn-prometheus-alertmanager 1 1 1 0 0s
auxilliary-pronghorn-prometheus-kube-state-metrics 1 1 1 0 0s
auxilliary-pronghorn-prometheus-pushgateway 1 1 1 0 0s
auxilliary-pronghorn-prometheus-server 1 1 1 0 0s
==> v1beta1/Ingress
NAME HOSTS ADDRESS PORTS AGE
auxilliary-pronghorn-prometheus-alertmanager alertmanager.earth.myzone.com 80 0s
auxilliary-pronghorn-prometheus-pushgateway pushgateway.earth.myzone.com 80 0s
auxilliary-pronghorn-prometheus-server server.earth.myzone.com 80 0s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
auxilliary-pronghorn-prometheus-node-exporter-kjp25 0/1 ContainerCreating 0 0s
auxilliary-pronghorn-prometheus-node-exporter-r2sfn 0/1 ContainerCreating 0 0s
auxilliary-pronghorn-prometheus-alertmanager-684bb4bf8d-lq5z9 0/2 Pending 0 0s
auxilliary-pronghorn-prometheus-kube-state-metrics-69478d6lwdpq 0/1 ContainerCreating 0 0s
auxilliary-pronghorn-prometheus-pushgateway-6f97d7bc4d-jvj2c 0/1 ContainerCreating 0 0s
auxilliary-pronghorn-prometheus-server-65974d66bc-876rt 0/2 Pending 0 0s
==> v1/ConfigMap
NAME DATA AGE
auxilliary-pronghorn-prometheus-alertmanager 1 1s
auxilliary-pronghorn-prometheus-server 3 1s
==> v1/PersistentVolumeClaim
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
auxilliary-pronghorn-prometheus-alertmanager Pending gp2 1s
auxilliary-pronghorn-prometheus-server Pending gp2 1s
NOTES:
The Prometheus server can be accessed via port 80 on the following DNS name from within your cluster:
auxilliary-pronghorn-prometheus-server.default.svc.cluster.local
From outside the cluster, the server URL(s) are:
http://server.earth.myzone.com
The Prometheus alertmanager can be accessed via port 80 on the following DNS name from within your cluster:
auxilliary-pronghorn-prometheus-alertmanager.default.svc.cluster.local
From outside the cluster, the alertmanager URL(s) are:
http://alertmanager.earth.myzone.com
The Prometheus PushGateway can be accessed via port 9091 on the following DNS name from within your cluster:
auxilliary-pronghorn-prometheus-pushgateway.default.svc.cluster.local
From outside the cluster, the pushgateway URL(s) are:
http://pushgateway.earth.myzone.com
For more information on running Prometheus, visit:
https://prometheus.io/
(I changed my real domain to a fake one here)
But when I tried to access the three services:
All of them can't been accessed. I don't know why. How to debug or find the reason?
This error
zsh: no matches found: alertmanager.ingress.hosts=[alertmanager.earth.myzone.com]
is your shell, zsh, complaining because it believes you are trying to execute something related with it. Use quotes to avoid that. Furthermore, Helm expects curly braces for lists.
helm install prometheus \
--set alertmanager.ingress.enabled=true \
--set "alertmanager.ingress.hosts={alertmanager.earth.myzone.com}" \
--set pushgateway.ingress.enabled=true \
--set "pushgateway.ingress.hosts={pushgateway.earth.myzone.com}" \
--set server.ingress.enabled=true \
--set "server.ingress.hosts={server.earth.myzone.com}"