To install a specific version of Prometheus, such as version 6.7.4, you can use the Helm package manager. However, if you find that the latest version is being installed instead, follow these steps to ensure the correct version is deployed.
Step 1: Add the Prometheus Helm Repository
First, ensure that you have added the Prometheus Helm repository to your local Helm setup. You can do this with the following command:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
Step 2: Install the Desired Version
To install Prometheus version 6.7.4, use the following command:
helm install prometheus prometheus-community/prometheus --version 6.7.4 --namespace prometheus
Step 3: Verify the Installation
After running the installation command, you can check the deployed version by listing the Helm releases:
helm ls --namespace prometheus
This should display the installed version of Prometheus. If you still see the latest version (e.g., prometheus-6.8.0), ensure that you are not referencing a local chart that might be overriding the specified version.
Troubleshooting
If the installation command does not work as expected, consider the following:
- Ensure that your Helm client is up to date.
- Check if the specified version exists in the repository by running:
helm search repo prometheus-community/prometheus --versions
This command will list all available versions of the Prometheus chart, allowing you to confirm that 6.7.4 is indeed available for installation.
By following these steps, you should be able to successfully install the desired version of Prometheus in your Kubernetes environment.