DEV Community

Maxime Guilbert
Maxime Guilbert

Posted on • Edited on

2 1 1

Comment définir un proxy dans son fichier kubeconfig?

Dans certains contexts, il se peut que l'on ait besoin d'utiliser un proxy afin d'accéder à un cluster Kubernetes. Mais comment le définir dans son fichier kubeconfig?

Solution

Dans le paramètre clusters[].cluster, il vous suffit d'ajouter le paramètre proxy-url avec le format suivant comme valeur.

http://user:password@proxy:port

Exemple

apiVersion: v1
kind: Config
clusters:
- name: "dev"
  cluster:
    proxy-url: http://user:password@proxy:port
    server: "https://10.100.12.12:9006/k8s/clusters/c-jm5ws"
    ...
Enter fullscreen mode Exit fullscreen mode

Une fois modifié et enregistré, vous devriez pouvoir utiliser votre proxy et réussir à vous connecter!


Liens

J'espère que ça vous aidera! 🍺


Vous voulez me supporter?

Buy Me A Coffee

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay