Eric Dobbs ad1c5af0d8 change domain names in kubernetes example to use localhost
Now that both chrome and firefox understand *.localhost domains we can
remove our suggestion of using localtest.me subdomains.

Also update the brew install instructions now that brew cask install
is deprecated in favor of brew install --cask

My favorite improvement is finding a way to use yaml block labels and
references to reduce the duplication in the ingress config.

I suppose the last important thing to mention about this changes is
that k3d seems to have switched from traefik to nginx for its ingress
loadbalancer. We no longer need the traefik annotation.
2021-01-10 16:05:24 -07:00

65 lines
1.2 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.6
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: wiki
spec:
rules:
- host: "*.localhost"
http: &wiki
paths:
- path: /
backend:
serviceName: wiki-service
servicePort: http
# - host: "*.example.com"
# http: *wiki