modified: README.md

This commit is contained in:
Márcio Fernandes
2026-07-18 11:47:48 +00:00
parent fd14473b99
commit 86f971fb35
+15
View File
@@ -12,6 +12,7 @@ Kubernetes is an opensource platform that automates the deployment, scaling,
- [OOMKilled](#oomkilled)
- [Attach to an pod](#attach-to-an-pod)
- [Run command on pod](#run-command-on-pod)
- [Container TTY](#container-tty)
- [Persistent volumes](#persistent-volumes)
- [create PersistentVolumes - host path](#create-persistentvolumes---host-path)
- [find persistent volume used pvc](#find-persistent-volume-used-pvc)
@@ -274,6 +275,20 @@ POD_NAME=$(kubectl get pod -l app=$MY_APP_NAME -n $NAMESPACE -o jsonpath='{.item
kubectl exec -n $NAMESPACE -it ${POD_NAME} -- sh
```
### Container TTY
```yaml
...
command: ["bash", "-c"]
tty: true
args:
- |
while true; do
sleep 100
done
...
```
``` bash
# bash
POD_NAME=$(kubectl get pod -l app=myAppName -n appNamespace -o jsonpath='{.items[0].metadata.name}')