apiVersion: v1 kind: Service metadata: name: headscale-service namespace: headscale spec: selector: app: headscale ports: - name: http port: 8080 targetPort: 8080 - name: metrics port: 9090 targetPort: 9090 --- apiVersion: apps/v1 kind: Deployment metadata: name: headscale-deployment namespace: headscale spec: replicas: 1 selector: matchLabels: app: headscale template: metadata: labels: app: headscale spec: containers: - name: headscale image: headscale/headscale:latest command: ["serve"] ports: - containerPort: 8080 name: http - containerPort: 9090 name: metrics resources: requests: memory: "256Mi" cpu: "250m" limits: memory: "1Gi" cpu: "1" livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 30 periodSeconds: 15 timeoutSeconds: 5 readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 10 periodSeconds: 10 volumeMounts: - name: config mountPath: /etc/headscale - name: data mountPath: /var/lib/headscale volumes: - name: config configMap: name: headscale-config - name: data persistentVolumeClaim: claimName: headscale-data-pvc --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: headscale-data-pvc namespace: headscale spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi