Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41041

kubernetes-plugin option to override kubectl set-cluster

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Incomplete
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • Jenkins 2.32.1 on CentOS 7.3 installed from rpm; kubernetes-plugin version 0.10

      New user to kubernetes-plugin 0.10 looking to use it instead of shell script for maintaining my kubectl settings (credentials, cluster, context).

      I configured a simple build with this plugin to list pods in a remote kubernetes cluster and got this error:

      Building in workspace /var/lib/jenkins/workspace/DMartin-test1
      $ kubectl config --kubeconfig=/var/lib/jenkins/workspace/DMartin-test1/.kube6466975874127483496config set-cluster k8s --server=https://x.x.x.x --insecure-skip-tls-verify=true
      

      I looked in plugin code for where it was getting the cluster name k8s and found it hard coded in KubectlBuildWrapper.java.

      Can setting of cluster name (and even context) be provided by this plugin as a run time setting that defaults to the current hard coded value if not specified? If not I would like to request this feature.

            csanchez Carlos Sanchez
            damartin77 David Martin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: