Como abrir um shell em um Pod

Comando:

kubectl exec -it nginx -- /bin/sh

Teste:

ls -l

Resultado:

total 80
drwxr-xr-x   2 root root 4096 Dec 20 00:00 bin
drwxr-xr-x   2 root root 4096 Dec 11 17:25 boot
drwxr-xr-x   5 root root  360 Jan 10 19:14 dev
drwxr-xr-x   1 root root 4096 Dec 29 19:28 docker-entrypoint.d
-rwxrwxr-x   1 root root 1202 Dec 29 19:28 docker-entrypoint.sh
drwxr-xr-x   1 root root 4096 Jan 10 19:14 etc
drwxr-xr-x   2 root root 4096 Dec 11 17:25 home
drwxr-xr-x   1 root root 4096 Dec 20 00:00 lib
drwxr-xr-x   2 root root 4096 Dec 20 00:00 lib64
drwxr-xr-x   2 root root 4096 Dec 20 00:00 media
drwxr-xr-x   2 root root 4096 Dec 20 00:00 mnt
drwxr-xr-x   2 root root 4096 Dec 20 00:00 opt
dr-xr-xr-x 314 root root    0 Jan 10 19:14 proc
drwx------   2 root root 4096 Dec 20 00:00 root
drwxr-xr-x   1 root root 4096 Jan 10 19:14 run
drwxr-xr-x   2 root root 4096 Dec 20 00:00 sbin
drwxr-xr-x   2 root root 4096 Dec 20 00:00 srv
dr-xr-xr-x  13 root root    0 Jan 10 19:14 sys
drwxrwxrwt   1 root root 4096 Dec 29 19:28 tmp
drwxr-xr-x   1 root root 4096 Dec 20 00:00 usr
drwxr-xr-x   1 root root 4096 Dec 20 00:00 var

Deixe um comentário

O seu endereço de e-mail não será publicado.