Eric Dobbs 45dbb893d1 Simplest wiki command that could possibly work
Now that we've figured out how to mount local directories into the k8s
cluster, we have moved all the configuration into ~/.wiki-k8s/config.json
2020-01-19 15:11:12 -07:00

72 lines
1.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: wiki-deployment
spec:
replicas: 1
selector:
matchLabels:
app: wiki
template:
metadata:
labels:
app: wiki
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: farm
image: dobbs/farm:1.0.1
command: ["wiki"]
ports:
- containerPort: 3000
volumeMounts:
- name: dot-wiki
mountPath: /home/node/.wiki
- name: fedwiki
mountPath: /home/node/fedwiki
volumes:
- name: dot-wiki
hostPath:
path: /macos/.wiki-k8s
- name: fedwiki
hostPath:
path: /macos/fedwiki
---
apiVersion: v1
kind: Service
metadata:
name: wiki-service
spec:
ports:
- name: http
targetPort: 3000
port: 80
selector:
app: wiki
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: simple-wiki
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: simple.localtest.me
http:
paths:
- path: /
backend:
serviceName: wiki-service
servicePort: http
- host: "*.simple.localtest.me"
http:
paths:
- path: /
backend:
serviceName: wiki-service
servicePort: http