diff --git a/k8s/apps/comfyui/deployment.yaml b/k8s/apps/comfyui/deployment.yaml index 2e723a0..017b757 100644 --- a/k8s/apps/comfyui/deployment.yaml +++ b/k8s/apps/comfyui/deployment.yaml @@ -22,19 +22,19 @@ spec: nodeSelector: kubernetes.io/hostname: worker-1 runtimeClassName: nvidia + # k8s Service named 'comfyui' injects COMFYUI_PORT=tcp://... into pod env, + # which clobbers ai-dock's own COMFYUI_PORT variable (expects a port number). + # Disable service link injection to avoid the collision. + enableServiceLinks: false containers: - name: comfyui image: ghcr.io/ai-dock/comfyui:v2-cuda-12.1.1-base-22.04 ports: - - containerPort: 18188 + - containerPort: 8188 protocol: TCP env: - name: NVIDIA_VISIBLE_DEVICES value: "all" - # ai-dock adds 10000 to port: ComfyUI listens on 18188 (localhost) - # caddy is NOT configured to proxy 8188->18188 in this image - - name: COMFYUI_PORT_HOST - value: "18188" resources: requests: cpu: "4" @@ -52,14 +52,14 @@ spec: readinessProbe: httpGet: path: / - port: 18188 + port: 8188 periodSeconds: 10 initialDelaySeconds: 30 startupProbe: httpGet: path: / - port: 18188 - failureThreshold: 60 + port: 8188 + failureThreshold: 120 periodSeconds: 10 volumes: - name: models diff --git a/k8s/apps/comfyui/service.yaml b/k8s/apps/comfyui/service.yaml index 4bb9691..7afee74 100644 --- a/k8s/apps/comfyui/service.yaml +++ b/k8s/apps/comfyui/service.yaml @@ -10,5 +10,5 @@ spec: app: comfyui ports: - port: 80 - targetPort: 18188 + targetPort: 8188 protocol: TCP