Common Helm commands
After you’ve installed CloudBees Core using Helm, you can use Helm to manage your CloudBees Core 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
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.
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 <1> NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE cloudbees-core 24 Fri Nov 15 19:31:09 2019 DEPLOYED cloudbees-core-3.7.0+4c080b555b9a 184.108.40.206 cloudbees-core cloudbees-sidecar-injector 1 Tue Nov 19 15:46:41 2019 DEPLOYED cloudbees-sidecar-injector-2.0.0 2.0.0 cloudbees-sidecar-injector nginx-ingress 98 Tue Nov 19 15:15:40 2019 DEPLOYED nginx-ingress-1.3.1 0.22.0 nginx-ingress
|1||This is the default
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 last revision, but does not automatically purge deleted resources.
To purge everything from the cluster, use the
helm delete cloudbees-core --purge (1) (2)
|1||The command removes all the components associated with the chart and deletes the release.|
helm history command lists all the revisions for a CloudBees Core release. Metadata for Helm releases is stored as Kubernetes secrets.
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 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
helm rollback command rolls back changes on your CloudBees Core Helm release.
The rollback command provides a quick method to restore CloudBees Core to a previously known state.
Helm rollback uses the release’s revision number.
The revision number can be found by using the
In this example, first use
helm history to find the revisions for
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.
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
status command can be a very useful tool for troubleshooting issues.
$ helm status cloudbees-core LAST DEPLOYED: Thu Sep 5 18:41:24 2019 (1) NAMESPACE: cloudbees-core STATUS: DEPLOYED (2) RESOURCES: ==> v1/ConfigMap (3) NAME DATA AGE cjoc-configure-jenkins-groovy 1 13d cloudbees-core-nginx-ingress-controller 1 13d jenkins-agent 1 13d ==> v1/Pod(related) (3) NAME READY STATUS RESTARTS AGE cloudbees-core-nginx-ingress-controller-d9979cbdd-775zn 1/1 Running 0 3d23h (4) cloudbees-core-nginx-ingress-default-backend-59dd99ff9c-vwnwx 1/1 Running 0 3d23h (4) ==> v1/Role (3) NAME AGE cjoc-agents 13d cjoc-master-management 13d ==> v1/RoleBinding (3) NAME AGE cjoc-master-role-binding 13d cjoc-role-binding 13d ==> v1/Service (3) NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE cjoc ClusterIP 10.15.253.6 <none> 80/TCP,50000/TCP 13d cloudbees-core-nginx-ingress-controller LoadBalancer 10.15.252.130 220.127.116.11 80:30099/TCP,443:30165/TCP 13d cloudbees-core-nginx-ingress-default-backend ClusterIP 10.15.242.131 <none> 80/TCP 13d ==> v1/ServiceAccount (3) NAME SECRETS AGE cjoc 1 13d cloudbees-core-nginx-ingress 1 13d jenkins 1 13d ==> v1beta1/ClusterRole (3) NAME AGE cloudbees-core-nginx-ingress 13d ==> v1beta1/ClusterRoleBinding (3) NAME AGE cloudbees-core-nginx-ingress 13d ==> v1beta1/Deployment (3) NAME READY UP-TO-DATE AVAILABLE AGE cloudbees-core-nginx-ingress-controller 1/1 1 1 13d cloudbees-core-nginx-ingress-default-backend 1/1 1 1 13d ==> v1beta1/Ingress (3) NAME HOSTS ADDRESS PORTS AGE cjoc cloudbees-core.example.com 18.104.22.168 80 13d ==> v1beta1/Role (3) NAME AGE cloudbees-core-nginx-ingress 13d ==> v1beta1/RoleBinding (3) NAME AGE cloudbees-core-nginx-ingress 13d ==> MISSING (5) KIND NAME apps/v1, Resource=statefulsets cjoc NOTES: (6)
|1||The time of the last deployment of the release.|
|2||The status of the last release is shown here.|
|3||All the Kubernetes resources the Helm Chart should create. This also shows their current status.|
|4||If the installation is using the CloudBees Core Helm chart for NGINX Ingress Controller installation, these two
|5||Any resource that is not properly created will be highlighted.
In this example, the
|6||The notes section provides a quickstart summary for CloudBees Core. The notes section has been truncated in this example.|