mqtt是干嘛的,网上有很多资料,这里就不再赘述。
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- labels:
- app: mqtt
- name: mqtt
- namespace: default
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: mqtt
- strategy:
- rollingUpdate:
- maxSurge: 25%
- maxUnavailable: 25%
- type: RollingUpdate
- template:
- metadata:
- labels:
- app: mqtt
- spec:
- containers:
- - image: 'emqx/emqx:latest'
- imagePullPolicy: Always
- name: mqtt
- ports:
- - containerPort: 18083
- name: dashboard
- protocol: TCP
- - containerPort: 8083
- name: data
- protocol: TCP
- resources: {}
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- dnsPolicy: ClusterFirst
- restartPolicy: Always
- schedulerName: default-scheduler
- securityContext: {}
- terminationGracePeriodSeconds: 30
-
- ---
- apiVersion: v1
- kind: Service
- metadata:
- annotations: {}
- labels:
- app: mqtt
- name: mqtt-svc
- namespace: default
- spec:
- ports:
- - name: cbf36m
- nodePort: 32004
- port: 18083
- protocol: TCP
- targetPort: 18083
- - name: tffafa
- nodePort: 31238
- port: 8083
- protocol: TCP
- targetPort: 8083
- selector:
- app: mqtt
- sessionAffinity: None
- type: NodePort
登录账号:admin
密码:public

