Always match the agent version to the Portainer Server version. In other words, when you're installing or upgrading to Portainer 2.9.3 make sure all of the agents are also on version 2.9.3.
Before beginning any upgrade, we highly recommend taking a backup of your current Portainer configuration.
Starting from Portainer CE 2.9, HTTPS is enabled by default on port 9443. These instructions will configure Portainer to use both 9443 for HTTPS and 9000 for HTTP. You can choose to completely disable HTTP after the upgrade.
Before you make Portainer HTTPS only, make sure you have all your Agents and Edge Agents already communicating with Portainer using HTTPS.
Select the Portainer upgrade method which matches the original installation method used.
Method 1: Upgrading using Helm
Add the Portainer Helm repository by running the following commands. Ignore any warnings about the repo already being there:
If you have set a custom AGENT_SECRET on your Portainer Server instance you must remember to explicitly provide this in the YAML when updating your agent:
- AGENT_SECRET: yoursecret
Log into Portainer and connect to the Kubernetes environment where Portainer is installed. From the menu select Applications then select Advanced Deployment. Select the portainer namespace then select Web Editor:
Paste the contents of the YAML file then click Deploy.
Portainer will process the manifest and should return you to the login page once the upgrade is complete.
Option 2: Via the command line
If you prefer to use the command line to upgrade, you can do so using kubectl commands:
Log into the control node of your Kubernetes cluster and run the following command: