Skip to content

Instantly share code, notes, and snippets.

@nabsul
Created Sep 17, 2022
Embed
What would you like to do?
Simple yaml for deploying NATS to Kubernetes
apiVersion: v1
kind: Service
metadata:
name: nats
labels:
app: nats
spec:
ports:
- name: nats
protocol: TCP
port: 4222
targetPort: 4222
selector:
app: nats
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nats
labels:
app: nats
spec:
replicas: 1
selector:
matchLabels:
app: nats
template:
metadata:
labels:
app: nats
spec:
containers:
- name: nats
image: nats:2.6.4
ports:
- containerPort: 4222
name: nats
- containerPort: 8222
name: http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment