Skip to content

Instantly share code, notes, and snippets.

@ycyr
Last active April 10, 2025 10:15
Show Gist options
  • Select an option

  • Save ycyr/09c145ff7e3ea0c8454936932323e042 to your computer and use it in GitHub Desktop.

Select an option

Save ycyr/09c145ff7e3ea0c8454936932323e042 to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: Namespace
metadata:
name: tp-troubleshooting
---
# ❌ Pod avec une image invalide
apiVersion: v1
kind: Pod
metadata:
name: broken-pod
namespace: tp-troubleshooting
spec:
containers:
- name: web
image: someimage/doesnotexist:latest
ports:
- containerPort: 80
---
# ❌ PVC non lié à un PV (pas de provisionnement possible)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: unbound-pvc
namespace: tp-troubleshooting
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
# ❌ Pod qui monte un PVC inexistant
apiVersion: v1
kind: Pod
metadata:
name: broken-pod-2
namespace: tp-troubleshooting
spec:
containers:
- name: busy
image: busybox
command: ["sleep", "3600"]
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-that-does-not-exist
---
# ❌ Service dont le selector ne pointe vers aucun Pod
apiVersion: v1
kind: Service
metadata:
name: svc-no-target
namespace: tp-troubleshooting
spec:
selector:
app: ghost
ports:
- port: 80
targetPort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment