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.
This commit is contained in:
Eric Dobbs 2021-01-10 16:02:45 -07:00
parent b2b868f0be
commit ad1c5af0d8
2 changed files with 13 additions and 17 deletions

View File

@ -5,7 +5,7 @@ using wiki to drive some learning about kubernetes.
# We're using MacOS, Docker Desktop, and k3d # We're using MacOS, Docker Desktop, and k3d
brew cask install docker brew install --cask docker
brew install k3d brew install k3d
mkdir -p ~/.wiki-k8s ~/workspace/fedwiki mkdir -p ~/.wiki-k8s ~/workspace/fedwiki
@ -26,13 +26,16 @@ using wiki to drive some learning about kubernetes.
"secure_cookie": false, "secure_cookie": false,
"security_type": "friends", "security_type": "friends",
"wikiDomains": { "wikiDomains": {
"simple.localtest.me": { "localhost": {
"id": "/home/node/.wiki/config.owner.json" "id": "/home/node/.wiki/localhost.owner.json"
},
"example.com": {
"id": "/home/node/.wiki/example.com.owner.json"
} }
} }
} }
# example ~/.wiki-k8s/config.owner.json # example ~/.wiki-k8s/localhost.owner.json
`.friend.secret` must match the `.admin` field from `config.json` `.friend.secret` must match the `.admin` field from `config.json`
@ -50,4 +53,4 @@ using wiki to drive some learning about kubernetes.
# Play with the wiki # Play with the wiki
open http://simple.localtest.me open http://wiki.localhost

View File

@ -50,22 +50,15 @@ spec:
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
name: simple-wiki name: wiki
annotations:
kubernetes.io/ingress.class: traefik
spec: spec:
rules: rules:
- host: simple.localtest.me - host: "*.localhost"
http: http: &wiki
paths:
- path: /
backend:
serviceName: wiki-service
servicePort: http
- host: "*.simple.localtest.me"
http:
paths: paths:
- path: / - path: /
backend: backend:
serviceName: wiki-service serviceName: wiki-service
servicePort: http servicePort: http
# - host: "*.example.com"
# http: *wiki