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

370
Visualizações
Get contents of /etc/resolv.conf of coredns pod in kubernetes

I am new to k8 and I am learning how DNS works inside a k8 cluster. I am able to get the contents of /etc/resolv.conf of a random pod in the default namespace but I am unable to get the contents /etc/resolv.conf of coredns pod in kube-system namespace.

$>kubectl exec kubia-manual-v2 -- cat /etc/resolv.conf

Output: nameserver 10.96.0.10

$>kubectl exec coredns-74ff55c5b-c8dk6 --namespace kube-system -- cat /etc/resolv.conf

Output:

OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: exec: "cat": executable file not found in $PATH: unknown

command terminated with exit code 126

It looks like the cat system binary is not present in the $PATH. So, I wanted to know how can I get the contents of /etc/resol.conf of coredns pod.

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

0

Coredns is using scratch as the base layer running it's coredns binary. You can see the Dockerfile here for reference.

You can follow the instructions in this SO post to copy busybox into your coredns container and that will give you the ability to play around it. Keep in mind that you will probably have to ssh into the k8s node running this container to make this work.

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