Last active
March 29, 2025 11:25
-
-
Save CalvinHartwell/a8b2f9b30bfbad1bf97596a43d620326 to your computer and use it in GitHub Desktop.
Kubecon Demo 2025 Comfyui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install k8s | |
sudo snap install k8s --classic | |
sudo k8s bootstrap | |
# Create namespace | |
sudo k8s kubectl create ns gpu-operator | |
sudo k8s kubectl label --overwrite ns gpu-operator pod-security.kubernetes.io/enforce=privileged | |
# Add Helm Repo | |
sudo k8s helm repo add nvidia https://helm.ngc.nvidia.com/nvidia \ | |
&& sudo k8s helm repo update | |
# If you have nvidia drivers pre-installed on your system | |
sudo k8s helm install --wait --generate-name \ | |
-n gpu-operator --create-namespace \ | |
nvidia/gpu-operator \ | |
--version=v25.3.0 \ | |
--set driver.enabled=false | |
# Deploy workload | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: comfyui | |
spec: | |
selector: | |
matchLabels: | |
run: comfyui | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
run: comfyui | |
spec: | |
containers: | |
- name: comfyui | |
image: calvinhartwell/comfyui:latest | |
resources: | |
limits: | |
nvidia.com/gpu: 1 | |
ports: | |
- containerPort: 8188 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: comfyui | |
labels: | |
run: comfyui | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 80 | |
protocol: TCP | |
selector: | |
run: comfyui | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: comfyui | |
namespace: default | |
spec: | |
ingressClassName: cilium | |
rules: | |
- host: "comfyui.canonical.lan" | |
http: | |
paths: | |
- backend: | |
service: | |
name: comfyui | |
port: | |
number: 8188 | |
path: / | |
pathType: Prefix | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment