Skip to content

Instantly share code, notes, and snippets.

@CalvinHartwell
Last active March 29, 2025 11:25
Show Gist options
  • Save CalvinHartwell/a8b2f9b30bfbad1bf97596a43d620326 to your computer and use it in GitHub Desktop.
Save CalvinHartwell/a8b2f9b30bfbad1bf97596a43d620326 to your computer and use it in GitHub Desktop.
Kubecon Demo 2025 Comfyui
# 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