Friday, November 15, 2024
Google search engine
HomeGuest BlogsHow To Get Helm Logs Of Changed Helm Releases

How To Get Helm Logs Of Changed Helm Releases

Introduction

Being able to access information about a Helm release isĀ important for maintaining a Kubernetes cluster. Helm does not feature a command that displays release logs. However, similar results can be achieved using two other commands.

This tutorial will teach you how to useĀ helm historyĀ andĀ helm listĀ to obtain information about your Helm releases.

How to Get Helm Logs of Changed Helm ReleasesHow to Get Helm Logs of Changed Helm Releases

Prerequisites

Using helm history to Display Changes Made to a Release

TheĀ helm historyĀ command displays historical revisions of a release. To see the history for any release, type:

helm history [release-name]

The output of this command is a table, as in the image below.

Using helm history to see changes within a releaseUsing helm history to see changes within a release

The table features revision numbers, the date and time of the revision, its status, the name of the release chart, the version of the app, and a description. The description column contains information aboutĀ installation, upgrades, andĀ rollbacks.

The default maximum of releases shown is 256. To limit the number of releases to a smaller number, use theĀ --maxĀ argument:

helm history [release-name] --max [integer]
Limiting the number of entries shown by helm historyLimiting the number of entries shown by helm history

With theĀ --maxĀ argument, Helm displays only the specified number of latest revisions.

Note: To print the output in a format other than the table, use the -o option followed by the format type. Other allowed formats are yaml and json.

Using helm list to Filter Release Information

TheĀ helm listĀ command lists all the releases in the current namespace unless a different namespace is specified with theĀ -nĀ option. To search for a particular release, use theĀ --filterĀ option followed by a Pearl compatible regular expression:

helm list --filter '[expression]'

The output of the command is by default a table, but yaml and json formats are also available via theĀ -oĀ option:

Using helm list with filters to find a particular releaseUsing helm list with filters to find a particular release
The command displays only deployed and failed releases. Use flags to see other types. For example, to see superseded releases, type:

helm list --filter '[expression]' --superseded

Using helm list to list superseded releasesUsing helm list to list superseded releases
Other flags that you can use to filter releases include:

  • --allĀ ā€“ Shows all releases without applying any filters.
  • --deployedĀ ā€“ This is the default option, applied if no other options are specified. It displays the releases that are currently deployed.
  • --failedĀ ā€“ Shows failed releases.
  • --pendingĀ ā€“ Shows the releases pending deployment.
  • --uninstalledĀ ā€“ Displays releases uninstalled with theĀ --keep-historyĀ flag enabled during the uninstallation process.
  • --uninstallingĀ ā€“ Shows releases that are currently being uninstalled.

The flags can also be combined for a more detailed search.

Finally, theĀ helm listĀ output is sorted alphabetically. To sort the entries by date, use theĀ -dĀ (--date) argument:

Using the -d option to sort the output of helm list by dateUsing the -d option to sort the output of helm list by date

Note: Sometimes, upgrading your release can produce the ā€œhelm has no deployed releasesā€ error. Learn how to fix it.

Conclusion

While Helm does not have a dedicated logs command, you can combineĀ helm historyĀ andĀ helm listĀ features to obtain the necessary information about a release.

For more useful Helm commands, checkĀ Helm Command Cheat Sheet.

Was this article helpful?
YesNo

RELATED ARTICLES

Most Popular

Recent Comments

ź°•ģ„œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
źøˆģ²œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
źµ¬ģ›”ė™ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź°•ģ„œźµ¬ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ģ˜¤ģ‚°ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ģ•ˆģ–‘ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė™ķƒ„ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ģ„œģšøģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶„ė‹¹ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ķ™”ź³”ė™ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź°•ģ„œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź³ ģ–‘ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ķ™”ģ„±ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ģ²œķ˜øė™ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?