The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Kubernetes CLI Plugin

withKubeConfig: Configure Kubernetes CLI (kubectl)

Configure Kubernetes client (kubectl) so it can be used in the build to run Kubernetes commands
  • caCertificate (optional)
    The certificate of the certificate authority (CA). It's used to validate the API server certificate.

    Leaving this field empty will skip the certificate verification.

    • Type: String
  • clusterName (optional)
    Cluster name to use or to switch to.
    • Type: String
  • contextName (optional)
    Context name to use or to switch to.
    • Type: String
  • credentialsId (optional)
    • Type: String
  • namespace (optional)
    Default namespace.
    • Type: String
  • serverUrl (optional)
    URL of the Kubernetes API endpoint.
    • Type: String

withKubeCredentials: Configure Kubernetes CLI (kubectl) with multiple credentials

  • kubectlCredentials
      Array/List
      Nested Object
    • caCertificate (optional)
      • Type: String
    • clusterName (optional)
      • Type: String
    • contextName (optional)
      • Type: String
    • credentialsId (optional)
      • Type: String
    • namespace (optional)
      • Type: String
    • serverUrl (optional)
      • Type: String

wrap([$class: 'MultiKubectlBuildWrapper']): Configure Kubernetes CLI (kubectl) with multiple credentials

  • kubectlCredentials
      Array/List
      Nested Object
    • caCertificate (optional)
      • Type: String
    • clusterName (optional)
      • Type: String
    • contextName (optional)
      • Type: String
    • credentialsId (optional)
      • Type: String
    • namespace (optional)
      • Type: String
    • serverUrl (optional)
      • Type: String

wrap([$class: 'KubectlBuildWrapper']): Configure Kubernetes CLI (kubectl) (deprecated, use the multi credentials one instead)

Configure Kubernetes client (kubectl) so it can be used in the build to run Kubernetes commands
  • caCertificate (optional)
    The certificate of the certificate authority (CA). It's used to validate the API server certificate.

    Leaving this field empty will skip the certificate verification.

    • Type: String
  • clusterName (optional)
    Cluster name to use or to switch to.
    • Type: String
  • contextName (optional)
    Context name to use or to switch to.
    • Type: String
  • credentialsId (optional)
    • Type: String
  • namespace (optional)
    Default namespace.
    • Type: String
  • serverUrl (optional)
    URL of the Kubernetes API endpoint.
    • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.