nixos-servers/kubernetes/loadbalancer-test.yaml

35 lines
650 B
YAML

apiVersion: v1
kind: Service
metadata:
name: loadbalancer-test
# annotations:
# metallb.universe.tf/loadBalancerIPs: 192.168.1.100
spec:
ports:
- port: 80
targetPort: 8000
selector:
app: loadbalancer-test
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: loadbalancer-test
labels:
app: loadbalancer-test
spec:
replicas: 3
selector:
matchLabels:
app: loadbalancer-test
template:
metadata:
labels:
app: loadbalancer-test
spec:
containers:
- name: loadbalancer-test
image: mpepping/cyberchef
ports:
- containerPort: 8000