-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmosquitto_client.yaml
35 lines (35 loc) · 1.2 KB
/
mosquitto_client.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This is a sample from
# https://learn.microsoft.com/en-us/azure/iot-operations/manage-mqtt-connectivity/howto-test-connection
apiVersion: v1
kind: Pod
metadata:
name: mosquitto-client
# Namespace must match IoT MQ BrokerListener's namespace
# Otherwise use the long hostname: aio-mq-dmqtt-frontend.azure-iot-operations.svc.cluster.local
namespace: workload
spec:
# Use the "mqtt-client" service account which comes with default deployment
# Otherwise create it with `kubectl create serviceaccount mqtt-client -n workload`
serviceAccountName: mqtt-client
containers:
# Mosquitto and mqttui on Alpine
- image: alpine
name: mosquitto-client
command: ["sh", "-c"]
args: ["apk add mosquitto-clients mqttui && sleep infinity"]
volumeMounts:
- name: mq-sat
mountPath: /var/run/secrets/tokens
- name: trust-bundle
mountPath: /var/run/certs
volumes:
- name: mq-sat
projected:
sources:
- serviceAccountToken:
path: mq-sat
audience: aio-mq # Must match audience in BrokerAuthentication
expirationSeconds: 86400
- name: trust-bundle
configMap:
name: aio-ca-trust-bundle-test-only # Default root CA cert trust bundle