Skip to content

Commit

Permalink
Small changes in the CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlaverse committed Jul 15, 2018
1 parent 2ca7507 commit 35f46b2
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kubernetes Cli Plugin
# Kubernetes CLI Plugin

[![build-status](https://ci.jenkins.io/buildStatus/icon?job=Plugins/kubernetes-cli-plugin/master/)][master-build]
[![Coverage Status](https://coveralls.io/repos/github/jenkinsci/kubernetes-cli-plugin/badge.svg?branch=master)](https://coveralls.io/github/jenkinsci/kubernetes-cli-plugin?branch=master)
Expand All @@ -8,6 +8,10 @@ Any tool built on top of `kubectl` can then be used from your pipelines, e.g. [k

Initially extracted and rewritten from the [Kubernetes Plugin][kubernetes-plugin].

## Prerequisites
* An executor with `kubectl` installed (tested against v1.8, v1.9, v1.10, v1.11)
* A Kubernetes cluster

## Supported credentials
The following types of credentials are supported and can be used to authenticate against Kubernetes clusters:
* Username and Password (see [Credentials plugin][credentials-plugin])
Expand All @@ -22,26 +26,29 @@ The following types of credentials are supported and can be used to authenticate
The `kubernetes-cli` plugin provides the function `withKubeConfig()` for Jenkins Pipeline support.
You can go to the *Snippet Generator* page under *Pipeline Syntax* section in Jenkins, select
*withKubeConfig: Setup Kubernetes CLI* from the *Sample Step* dropdown, and it will provide you configuration
interface for the plugin.
After filling the entries and click *Generate Pipeline Script* button, you will get the sample scripts which can be used
interface for the plugin. After filling the entries and click *Generate Pipeline Script* button, you will get the sample scripts which can be used
in your Pipeline definition.

The arguments to the `withKubeConfig` step are:
* `credentialsId` - the Jenkins identifier of the credentials to use.
* `caCertificate` - an optional base64-encoded certificate to check the Kubernetes api server's against. If you don't specify one, the CA verification will be skipped.
* `serverUrl` - the url of the api server

Example:
```groovy
node {
stage('List pods') {
withKubeConfig([credentialsId: '<credential-id>', caCertificate: '<ca-certificate>', serverUrl: '<api-server-address>']) {
withKubeConfig([credentialsId: '<credential-id>',
caCertificate: '<ca-certificate>',
serverUrl: '<api-server-address>'
]) {
sh 'kubectl get pods'
}
}
}
```

The arguments to the `withKubeConfig` step are:
* `credentialsId` - the Jenkins identifier of the credentials to use.
* `caCertificate` - an optional base64-encoded certificate to check the Kubernetes api server's against. If you don't specify one, the CA verification will be skipped.
* `serverUrl` - the url of the api server


### From the web interface
In Jenkins > *job name* > Configure > **Build Environment**

Expand Down Expand Up @@ -77,4 +84,4 @@ mvn clean test
[kubectl]:https://kubernetes.io/docs/reference/kubectl/overview/
[kubernetes-deploy]:https://github.com/Shopify/kubernetes-deploy
[master-build]: https://ci.jenkins.io/job/Plugins/job/kubernetes-cli-plugin/job/master/
[issue-tracker]: https://issues.jenkins-ci.org/issues/?jql=project%20%3D%20JENKINS%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened%2C%20%22In%20Review%22)%20AND%20component%20%3D%20kubernetes-cli-plugin
[issue-tracker]: https://issues.jenkins-ci.org/issues/?jql=project%20%3D%20JENKINS%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened%2C%20%22In%20Review%22)%20AND%20component%20%3D%20kubernetes-cli-plugin

0 comments on commit 35f46b2

Please sign in to comment.