Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

447
Visualizações
Can we run an executable jar file inside an already running Kubernetes pod?

I need to execute a diagnostic program written for my application. The application is running/deployed in a Kubernetes pod. I want to copy a diagnostic executable jar file inside the Kubernetes pod and execute it without stopping the pod. How can this be achieved ? Is there a specific way to run the executable jar using the Kubernetes pod environment in place ?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You can try the kubectl cp command:

From the docs:

Copy /tmp/foo_dir local directory to /tmp/bar_dir in a remote pod in the default namespace

kubectl cp /tmp/foo_dir <some-pod>:/tmp/bar_dir

Copy /tmp/foo local file to /tmp/bar in a remote pod in a specific container

kubectl cp /tmp/foo <some-pod>:/tmp/bar -c <specific-container>

Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace

kubectl cp /tmp/foo <some-namespace>/<some-pod>:/tmp/bar

Copy /tmp/foo from a remote pod to /tmp/bar locally

kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/bar

Once the executable is added inside the container, you can exec into the pod and execute the file manually.

over 4 years ago · Santiago Trujillo Relatório

0

To open up interactive bash terminal

kubectl exec <pod name> -n <namespace> -c <container name> -it bash

After this, find your executable jar and run it. once completed, exit the terminal.

You can run it directly.

kubectl exec <podname> -n <namespace> -c <container name> -- < command to run your jar > 

check this official k8s page https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda