modified: README.md

This commit is contained in:
Márcio Fernandes
2026-05-05 19:17:48 +00:00
parent ae27ab285e
commit 0b399ca527
+36
View File
@@ -13,9 +13,11 @@ Kubernetes is an opensource platform that automates the deployment, scaling,
- [Attach to an pod](#attach-to-an-pod)
- [Run command on pod](#run-command-on-pod)
- [Persistent volumes](#persistent-volumes)
- [create PersistentVolumes - host path](#create-persistentvolumes---host-path)
- [find persistent volume used pvc](#find-persistent-volume-used-pvc)
- [Patch pv - change to retain policy](#patch-pv---change-to-retain-policy)
- [Patch pv - remove finalizers](#patch-pv---remove-finalizers)
- [persistent volume claims](#persistent-volume-claims)
- [kubectl](#kubectl)
- [Helper pods](#helper-pods)
- [network testing](#network-testing)
@@ -242,6 +244,24 @@ kubectl exec -it ${POD_NAME} -- ls /
## Persistent volumes
### create PersistentVolumes - host path
``` yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-host-folder
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: /path_on_host
type: DirectoryOrCreate
```
### find persistent volume used pvc
``` bash
@@ -267,6 +287,22 @@ kubectl patch pv $PV_NAME \
-p '{"metadata":{"finalizers": null}}'
```
### persistent volume claims
``` yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-host-folder
spec:
volumeName: pv-host-folder
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```
## kubectl
kubectl is the commandline tool used to interact with Kubernetes clusters. Think of it as the “remote control” for Kubernetes: it lets you deploy applications, inspect resources, and manage cluster operations directly from your terminal.