Add PersistentVolumeClaim for pod state persistence and update README
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 28s

This commit is contained in:
Michael Trip 2026-06-24 11:01:13 +02:00
parent 95281d36e1
commit e48f76441d
4 changed files with 14 additions and 1 deletions

View file

@ -7,6 +7,7 @@ These manifests deploy `k8s-mgmt-pod` as a single-replica bastion deployment ins
1. Build and publish the image. 1. Build and publish the image.
2. Replace the placeholder image in `deployment.yaml` with a pinned tag or digest. 2. Replace the placeholder image in `deployment.yaml` with a pinned tag or digest.
3. Create the real `k8s-mgmt-pod-auth` Secret instead of applying `secret.yaml.example`. 3. Create the real `k8s-mgmt-pod-auth` Secret instead of applying `secret.yaml.example`.
4. The pod state directory is now backed by a PVC, so SSH host keys and generated fallback passwords survive pod recreation until you delete the claim.
## Create the Secret ## Create the Secret

View file

@ -104,4 +104,5 @@ spec:
volumes: volumes:
- name: state - name: state
emptyDir: {} persistentVolumeClaim:
claimName: k8s-mgmt-pod-state

View file

@ -5,6 +5,7 @@ resources:
- namespace.yaml - namespace.yaml
- serviceaccount.yaml - serviceaccount.yaml
- rbac.yaml - rbac.yaml
- pvc.yaml
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
- networkpolicy.yaml - networkpolicy.yaml

10
k8s/pvc.yaml Normal file
View file

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: k8s-mgmt-pod-state
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi