Common Helm commands

3 minute read

After you’ve installed CloudBees CI using Helm, you can use Helm to manage your CloudBees CI installation. This section provides information on some of the most commonly-used Helm commands and the most-commonly-used options for those commands.

A complete overview of all the Helm commands and options is beyond the scope of this document. For a comprehensive list of Helm commands, you can use the --help option on any of the listed commands or refer to the Helm documentation.

Helm list

The helm list command lists the Helm releases installed on the cluster, which provides a convenient way to view the Helm charts installed on your cluster.

The helm list command can be useful if you forget to include a release name in your Helm install. If you don’t provide a name during installation, then Helm randomly creates a release name.

The list command includes a number of options that filter results.

The following example’s UPDATED column has been abbreviated.
$ helm list -A (1) NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE cloudbees-core 1 Fri Sep 25 19:31:09 2020 DEPLOYED cloudbees-core-3.20.0+7393ca8fd6d0 2.249.1.2 cloudbees-core cloudbees-sidecar-injector 1 Fri Sep 25 15:46:41 2020 DEPLOYED cloudbees-sidecar-injector-2.0.0 2.0.7 cloudbees-sidecar-injector ingress-nginx 1 Fri Sep 25 15:15:40 2020 DEPLOYED ingress-nginx-3.3.0 0.35.0 ingress-nginx
1 This is the default helm list output. It provides release name, revision, last update, status of the release, the application version, and namespace of the revision.

Helm delete

The helm delete command deletes a release. Note that until a release is not only deleted, but purged from the system, the release name will be unavailable for use with another Helm chart.

Deleting a release removes all resources associated with the release.

helm delete cloudbees-core (1) (2)
1 The command removes all the components associated with the chart and deletes the release.

Helm history

The helm history command lists all the revisions for a CloudBees CI release. Metadata for Helm releases is stored as Kubernetes secrets.

The helm history command provides the following details about each revision:

  • The revision number starting at 1

  • The time the revision updated the release

  • The status of the revision

  • The Helm chart version that was used to create the revision

  • A description of the revision action, such as installation, deletion, or rollback

helm history
$ helm history cloudbees-core (1) REVISION UPDATED STATUS CHART DESCRIPTION 1 Thu Oct 17 02:11:11 2019 SUPERSEDED cloudbees-core-2.176.104 Install complete 2 Thu Oct 17 02:17:51 2019 SUPERSEDED cloudbees-core-3.4.1 Upgrade complete 3 Thu Oct 17 02:25:55 2019 DEPLOYED cloudbees-core-2.176.104 Upgrade complete
1 Replace cloudbees-core with your release name.

Helm rollback

The helm rollback command rolls back changes on your CloudBees CI Helm release. The rollback command provides a quick method to restore CloudBees CI to a previously known state. Helm rollback uses the release’s revision number. The revision number can be found by using the helm history.

Example 1. helm rollback

In this example, first use helm history to find the revisions for cloudbees-core release. Then, pick revision 2 for the helm rollback operation.

$ helm history cloudbees-core (1) REVISION UPDATED STATUS CHART DESCRIPTION 1 Thu Oct 17 02:11:11 2019 SUPERSEDED cloudbees-core-2.176.104 Install complete 2 Thu Oct 17 02:17:51 2019 SUPERSEDED cloudbees-core-3.4.1 Upgrade complete (2) 3 Thu Oct 17 02:25:55 2019 DEPLOYED cloudbees-core-3.5.0 Upgrade complete $ helm rollback cloudbees-core 2 (2) Rollback was a success.
1 Replace cloudbees-core with your release name.
2 The revision helm rollback will roll back the cloudbees-core release.

Helm status

The helm status command provides the following information:

  • The last deployment time

  • The Kubernetes namespace in which the release lives

  • The state of the release (can be: UNKNOWN, DEPLOYED, DELETED, SUPERSEDED, FAILED or DELETING)

  • A list of resources that this release consists of, sorted by kind

  • Details on last test suite run, if applicable

  • Additional support notes provided by the chart

The helm status command can be a very useful tool for troubleshooting issues.

helm status example
$ helm status cloudbees-core LAST DEPLOYED: Thu Sep 5 18:41:24 2019 (1) NAMESPACE: cloudbees-core STATUS: DEPLOYED (2) REVISION: 1 TEST SUITE: None NOTES: (3) 1. Once {OC} is up and running, get your initial admin user password by running: kubectl rollout status sts cjoc --namespace cloudbees-core kubectl exec cjoc-0 --namespace cloudbees-core -- cat /var/jenkins_home/secrets/initialAdminPassword 2. Visit https://acme.example.com/cjoc/ 3. Login with the password from step 1. For more information on running {CI-CLOUD}, visit: xref:ROOT:index.adoc[CloudBees CI]
1 The time of the last deployment of the release.
2 The status of the last release is shown here.
3 The notes section provides a quickstart summary for CloudBees CI. The notes section has been truncated in this example.