fPaste.me

A free, anonymous, minimalist and open source paste tool.


Mosquitto k3s yaml
14-11-2020 18:28:45
Anonymous
---
apiVersion: v1
kind: Namespace
metadata:
name: mosquitto
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: local-path-pvc-mosquitto-data
namespace: mosquitto
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mosquitto
namespace: mosquitto
spec:
replicas: 1
selector:
matchLabels:
app: mosquitto
template:
metadata:
labels:
app: mosquitto
spec:
containers:
- name: mosquitto
image: eclipse-mosquitto
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "500m"
volumeMounts:
- name: vol-data
mountPath: /mosquitto/data
- name: vol-config
mountPath: /mosquitto/config/mosquitto.conf
ports:
- containerPort: 1883
imagePullPolicy: Always
volumes:
- name: vol-data
persistentVolumeClaim:
claimName: local-path-pvc-mosquitto-data
- name: vol-config
hostPath:
path: /etc/mosquitto.conf
type: File

---
apiVersion: v1
kind: Service
metadata:
name: mosquitto
namespace: mosquitto
spec:
ports:
- name: mqtt
port: 1883
targetPort: 1883
protocol: TCP
selector:
app: mosquitto