Skip to content

Instantly share code, notes, and snippets.

@tar-xzvff
Last active December 29, 2023 12:06
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tar-xzvff/495ed7e53c7007e1709982f4923efdb1 to your computer and use it in GitHub Desktop.
Save tar-xzvff/495ed7e53c7007e1709982f4923efdb1 to your computer and use it in GitHub Desktop.
Start n8n with Kubernetes. kubectl apply -f n8n.yml
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: n8n
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: n8n-deployment
namespace: n8n
spec:
replicas: 1
selector:
matchLabels:
app: n8n
template:
metadata:
labels:
app: n8n
spec:
containers:
- name: n8n
image: n8nio/n8n
ports:
- containerPort: 5678
env:
- name: N8N_BASIC_AUTH_ACTIVE
value: "true"
- name: N8N_BASIC_AUTH_USER
value: "n8n"
- name: N8N_BASIC_AUTH_PASSWORD
value: "n8n"
- name: GENERIC_TIMEZONE
value: "Asia/Tokyo"
---
apiVersion: v1
kind: Service
metadata:
name: n8n-deployment
namespace: n8n
spec:
type: NodePort
selector:
app: n8n
ports:
- protocol: TCP
port: 5678
nodePort: 32567
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment