rundeck-plugins / kubernetes

52 stars 59 forks source link

Plugin does not support multiple kubernetes clusters if auth is done with Cluster URL and Token #170

Open rophy opened 7 months ago

rophy commented 7 months ago

Plugin Version: 2.0.13

Steps to reproduce:

  1. Create two node sources with kubernetes plugin, specifying different kubernetes clusters, auth using Cluster URL and Token
  2. Configure the project to use kubernetes plugin as both Default Node Executor and Default File Copier, without any configuration.
  3. Try to discover nodes, you should be able to discover pods from both clusters.
  4. Try to run command on the nodes, you will fail saying kube_config is not found.

In contrast, in step (1), if you auth using kube_config, then step (4) should work.

Expected result: There should be a way for NodeExecutor and FileCopier to work for multiple kubernetes clusters using Cluster URL + Token.

Actual result: Multiple kubernetes clusters work for kubeconfig, but not for Cluster URL + Token.