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

290
Visualizações
How to use alternative kube config file

The default k8s config file is in ~/.kube/config Is it possible to specify the config explicitly when using kubectl command ? Thanks

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

0

kubectl can use the KUBECONFIG in three different ways:

  1. Using the KUBECONFIG present in ~/.kube/config if nothing is specified in kubectl command.

  2. Using the KUBECONFIG defined by using the KUBECONFIG environment variable if nothing is specified in kubectl command.

  3. Passing the KUBECONFIG as part of the kubectl command using the --kubeconfig flag as:

    kubectl --kubeconfig=<KUBECONFIG_PATH>
    

Further, the order of precedence is as follows:

  1. Use the KUBECONFIG if explicitly passed in the kubectl command
  2. Use the KUBECONFIG from the environment variable if --kubeconfig flag is not specified but the environment variable is set.
  3. Use the KUBECONFIG from ~/.kube/config if both --kubeconfig and KUBECONFIG are not specified.
over 4 years ago · Santiago Trujillo Relatório

0

Use KUBECONFIG env for using custom kubeconfig file with kubectl:

$ export KUBECONFIG=/path/to/config
over 4 years ago · Santiago Trujillo Relatório

0

Yes you can specify like this

kubectl config --kubeconfig=your_kubeconfi_file_path <YOUR_OPERATION> 
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