Add whoami as a second real app (docs/08 hands-on exercise)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# A tiny HTTP server that echoes back request details (headers, hostname,
|
||||
# IP) — useful as a second, real, end-to-end proof of the app-of-apps
|
||||
# pattern from docs/08-adding-new-apps.md: no storage, no privileged
|
||||
# access, just a Deployment and a Service like apps/demo/, but a completely
|
||||
# separate app added the normal way (drop files in apps/, commit, push).
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: whoami
|
||||
namespace: whoami
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: whoami
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: whoami
|
||||
spec:
|
||||
containers:
|
||||
- name: whoami
|
||||
image: traefik/whoami:v1.10
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -0,0 +1,10 @@
|
||||
# A Namespace is a way to group related resources together inside the
|
||||
# cluster, like a folder. Keeping "whoami" separate from other apps lets you
|
||||
# manage, view, and delete them independently (e.g. `kubectl -n whoami get pods`).
|
||||
#
|
||||
# We create this explicitly, as its own file, rather than letting Argo CD
|
||||
# invent it implicitly. That way it shows up in Git like everything else.
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: whoami
|
||||
@@ -0,0 +1,17 @@
|
||||
# type: LoadBalancer asks MetalLB for a real, routable address from this
|
||||
# cluster's dedicated BGP service pool — see docs/05-metallb.md. 10.10.60.12
|
||||
# is the next free address in docs/network.md at the time this was added.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: whoami
|
||||
namespace: whoami
|
||||
annotations:
|
||||
metallb.io/loadBalancerIPs: "10.10.60.12"
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: whoami
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
Reference in New Issue
Block a user