Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to deploy emqx-exporter on Kubernetes #90

Open
roynilanjan opened this issue Oct 17, 2024 · 1 comment
Open

Unable to deploy emqx-exporter on Kubernetes #90

roynilanjan opened this issue Oct 17, 2024 · 1 comment

Comments

@roynilanjan
Copy link

Hi,

I am unable to run emqx-exporter on my Kind cluster.
I am following https://docs.emqx.com/en/emqx-operator/latest/tasks/configure-emqx-prometheus.html to deploy.

I have configured the following yaml with emqx-dashboard service name , api key and secret.

apiVersion: v1
kind: Service
metadata:
labels:
app: emqx-exporter
name: emqx-exporter-service
spec:
ports:
- name: metrics
port: 8085
targetPort: metrics
selector:
app: emqx-exporter

apiVersion: apps/v1
kind: Deployment
metadata:
name: emqx-exporter
labels:
app: emqx-exporter
spec:
selector:
matchLabels:
app: emqx-exporter
replicas: 1
template:
metadata:
labels:
app: emqx-exporter
spec:
securityContext:
runAsUser: 1000
containers:
- name: exporter
image: emqx-exporter:latest
imagePullPolicy: IfNotPresent
args:
# "emqx-dashboard-service-name" is the service name that creating by operator for exposing 18083 port
- --emqx.nodes=${emqx-dashboard-service-name}:18083
- --emqx.auth-username=${paste_your_new_api_key_here}
- --emqx.auth-password=${paste_your_new_secret_here}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
ports:
- containerPort: 8085
name: metrics
protocol: TCP
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 20Mi
After applying the yaml the pods are not coming in running state :

k logs pod/emqx-exporter-697f97866-zmvx6
emqx-exporter: error: unknown long flag '--emqx.nodes', try --help
royn2@W1164RNGY3:~$ k logs pod/emqx-exporter-7955d74bdb-9whrw
Error from server (BadRequest): container "exporter" in pod "emqx-exporter-7955d74bdb-9whrw" is waiting to start: trying and failing to pull image

@shiinro
Copy link

shiinro commented Oct 25, 2024

EMQX operator doc wasn't updated

args with --emqx.nodes etc... was for version 0.1.x

Check this example: https://github.com/emqx/emqx-exporter/tree/main/examples/kubernetes if you want to use the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants