Every node is now both control plane and worker, giving real tolerance for losing any single machine (etcd quorum needs 3, not 1). A Talos VIP gives the cluster one stable address regardless of which node answers. Also pre-installs Longhorn for replicated storage, backed by a Talos UserVolume on each node's second disk (>=900GB, non-system) rather than the default path — mirroring the pattern from the homescale repo. Docs renumbered to make room for 06-longhorn.md; checklist, glossary, network map, and CLAUDE.md's guided-bootstrap instructions updated to match, including asking the user for node IPs, VIP, and disk info before generating any Talos config. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
# A Deployment describes a desired state ("I want 1 copy of nginx running,
|
|
# serving this ConfigMap's index.html") and hands it to Kubernetes, whose
|
|
# job is to continuously make reality match that description. If the Pod
|
|
# crashes, Kubernetes restarts it. If the node dies, Kubernetes (given more
|
|
# than one node — see docs/09-growing-up.md) reschedules it elsewhere.
|
|
# You never tell Kubernetes "start a container" directly; you describe the
|
|
# end state and it does the work. This is what "declarative" means.
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: demo
|
|
namespace: demo
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
# Tells the Deployment which Pods belong to it. Must match
|
|
# spec.template.metadata.labels below, or Kubernetes won't know
|
|
# this Deployment owns the Pods it creates.
|
|
matchLabels:
|
|
app: demo
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: demo
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:1.27-alpine
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
# Mounts the ConfigMap's index.html over nginx's default page.
|
|
- name: page
|
|
mountPath: /usr/share/nginx/html
|
|
volumes:
|
|
- name: page
|
|
configMap:
|
|
name: demo-page
|