From 7e921be539fca3e5e531fb373ce714f80079af57 Mon Sep 17 00:00:00 2001 From: Nawer Date: Tue, 6 Jan 2026 10:58:33 +0100 Subject: [PATCH] chore: Added kubernetes example file (#623) --- kubernetes/example.yaml | 87 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 kubernetes/example.yaml diff --git a/kubernetes/example.yaml b/kubernetes/example.yaml new file mode 100644 index 0000000..9cf0c3a --- /dev/null +++ b/kubernetes/example.yaml @@ -0,0 +1,87 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: rustdesk-server +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: rustdesk + template: + metadata: + labels: + app: rustdesk + spec: + containers: + # id Server (HBBS) + - name: hbbs + image: rustdesk/rustdesk-server:latest + env: + - name: RELAY_HOST + value: "rustdesk.yourdomain.tld" + command: ["hbbs", "-r", "$(RELAY_HOST):21117", "-k", "_"] + volumeMounts: + - mountPath: /root + name: rustdesk-data + ports: + - containerPort: 21115 + - containerPort: 21116 + protocol: TCP + - containerPort: 21116 + protocol: UDP + - containerPort: 21118 + + # Relay Server (HBBR) + - name: hbbr + image: rustdesk/rustdesk-server:latest + command: ["hbbr", "-k", "_"] + volumeMounts: + - mountPath: /root + name: rustdesk-data + ports: + - containerPort: 21117 + - containerPort: 21119 + + volumes: + - name: rustdesk-data + persistentVolumeClaim: + claimName: rustdesk-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: rustdesk-service +spec: + type: LoadBalancer # Or NodePort + selector: + app: rustdesk + ports: + - name: hbbs-tcp + port: 21115 + targetPort: 21115 + protocol: TCP + - name: hbbs-udp + port: 21116 + targetPort: 21116 + protocol: UDP + - name: hbbs-tcp-main + port: 21116 + targetPort: 21116 + protocol: TCP + - name: hbbr-tcp + port: 21117 + targetPort: 21117 + protocol: TCP +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: rustdesk-pvc +spec: + accessModes: + - ReadWriteOnce # RWM would be available only with pro version + resources: + requests: + storage: 1Gi