Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
Does Kubernetes always give a shell to the running container

I having my Pod manifest as below:

apiVersion: v1
kind: Pod
metadata:
  name: pod-nginx-container
spec:
  containers:
  - name: nginx-alpine-container-1
    image: nginx:alpine
    ports:
      - containerPort: 80

And I can get a shell to the Container running my Nginx using kubectl exec --stdin --tty pod-nginx-container -- /bin/sh

My question is does Kubernetes always give a shell to the running container? I mean suppose I have created my own image of Tomcat webserver, and when I use that image then will I still get the shell to login to the container running Tomcat?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Kubernetes

Kubernetes schedules Pods to nodes. A Pod consists of one or more containers - that are instantiated from container images.

Container image

A container image contains a command that will run as the main process but it can also contain other binaries and also a full Linux "userland" like e.g. Ubuntu with shell and lots of tools.

Container images can be built from "scratch" without any other software than e.g. your app, but typically contain some more software for your app to be runnable e.g. glibc. See distroless for minimal base images that does not contain a shell.

Conclusion

My question is does Kubernetes always give a shell to the running container? I mean suppose I have created my own image of Tomcat webserver, and when I use that image then will I still get the shell to login to the container running Tomcat?

Your container contain a shell, only if you have built in a shell - most likely by using a base image that contain a shell e.g. alpine or ubuntu.

It depends on what do you do in your Dockerfile before building a container image with docker build

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda