# examples/deployment.yaml
apiVersion: v1
kind: Service
metadata:
name: waterkube
spec:
selector:
app: waterkube
ports:
- name: app
protocol: TCP
port: 4000
- name: redis
protocol: TCP
port: 6379
clusterIP: None
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: waterkube
labels:
app: waterkube
spec:
replicas: 1
selector:
matchLabels:
app: waterkube
template:
metadata:
labels:
app: waterkube
spec:
containers:
- name: waterkube-redis
image: redis:alpine
ports:
- containerPort: 6379
- name: waterkube
image: ghcr.io/waterkube/waterkube
ports:
- containerPort: 4000
# examples/docker-compose.yml
version: '3'
services:
redis:
image: redis:alpine
restart: unless-stopped
waterkube:
image: ghcr.io/waterkube/waterkube
restart: unless-stopped
environment:
REDIS_URL: redis://redis:6379/0
ports:
- 4000:4000
# examples/job-map-create.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: waterkube-map-create
labels:
app: waterkube
spec:
backoffLimit: 0
ttlSecondsAfterFinished: 60
template:
spec:
containers:
- name: waterkube-map-create
image: ghcr.io/waterkube/waterkube
env:
- name: REDIS_URL
value: 'redis://waterkube:6379/0'
command:
- /app/waterkube
- map
- create
restartPolicy: Never
docker-compose exec waterkube /app/waterkube map create 🐚 Creating a new map... ✅ Map is ready
./waterkube web serve
./waterkube map create 🐚 Creating a new map... ✅ Map is ready
kubectl port-forward service/waterkube 4000:4000
# examples/job-diver-explore.yaml apiVersion: batch/v1 kind: Job metadata: name: waterkube-diver-explore labels: app: waterkube spec: backoffLimit: 0 ttlSecondsAfterFinished: 60 template: spec: containers: - name: waterkube-diver-explore image: ghcr.io/waterkube/waterkube env: - name: REDIS_URL value: 'redis://waterkube:6379/0' command: - /app/waterkube - diver - explore # - A0 # - A1 # ... restartPolicy: Never
docker-compose exec waterkube /app/waterkube diver explore A0 🤿 Swimming to the A0... ✅ Excavation has begun
./waterkube diver explore A0 🤿 Swimming to the A0... ✅ Excavation has begun