Upgrade KubeOps Software
3 minute read
Upgrading KubeOps Software
1. Update essential KubeOps Packages
Update kubeops setup
Before installing the kubeops software, create a kubeopsctl.yaml with following parameters:
### General values for registry access ###
apiVersion: kubeops/kubeopsctl/alpha/v3 # mandatory
kubeOpsUser: "demo" # mandatory
kubeOpsUserPassword: "Password" # mandatory
kubeOpsUserMail: "demo@demo.net" # mandatory
imagePullRegistry: "registry1.kubernative.net/lima" # mandatory, the registry from which the images for the cluster are pulled
localRegistry: false # mandatory, set to true if you use a local registry
After creating the kubeopsctl.yaml please place another file into your machine to update the software:
### Values for setup configuration ###
clusterName: "example" # mandatory
clusterUser: "root" # mandatory
kubernetesVersion: "1.28.2" # mandatory, check lima documentation
masterIP: 10.2.10.12 # mandatory
containerRuntime: "containerd" # mandatory
1. Remove old KubeOps software
If you want to remove the KubeOps software, it is recommended that you use your package manager. For RHEL environments it is yum, while for opensuse environments it would be zypper. If you want to remove the KubeOps software with yum, use the following commands:
yum autoremove kosi
yum autoremove lima
If you want to remove the KubeOps software with zypper, use the following commands:
zypper remove kosi
zypper remove lima
2. Install new KubeOps software
Now, you can install the new software with yum or zypper.
yum install <kosi-rpm>
zypper install <kosi-rpm>
3. Upgrade kubeops software
To upgrade your kubeops software, you have to use following command:
kubeopsctl apply -f kubeopsctl.yaml
4. Maintain the old Deployment Information (optional)
After upgrading KOSI from 2.5 to 2.6, the deployment.yaml file has to be moved to the $KUBEOPSROOT directory, if it is desired to keep old deployments.
Be sure there you set the $KUBEOPSROOT variable.
- Set the $KUBEOPSROOT variable
echo 'export KUBEOPSROOT="$HOME/kubeops"' >> $HOME/.bashrc
source ~/.bashrc
5. Update other softwares
1. Upgrade rook-ceph
In order to upgrade rook-ceph, you have to go in your kubeopsctl.yaml
file and set rook-ceph: false
to rook-ceph: true
After that, use the command bellow:
kubeopsctl apply -f kubeopsctl.yaml
2. Update harbor
For Updating harbor, change your kubeopsctl.yaml
file and set harbor: false
to harbor: true
.
Please set other applications to false
before applying the kubeopsctl.yaml
file.
3. Update opensearch
In order to update opensearch, change your kubeopsctl.yaml
file and set opensearch: false
to opensearch: true
.
Please set other applications to false
before applying the kubeopsctl.yaml
file.
4. Update logstash
In order to update logstash, change your kubeopsctl.yaml
file and set logstash: false
to logstash: true
Please set other applications to false
before applying the kubeopsctl.yaml
file.
5. Update filebeat
In order to update filebeat, change your kubeopsctl.yaml
file and set filebeat: false
to filebeat: true
.
Please set other applications to false
before applying the kubeopsctl.yaml
file.
6. Update prometheus
In order to update prometheus, change your kubeopsctl.yaml
file and set prometheus: false
to prometheus: true
.
Please set other applications to false
before applying the kubeopsctl.yaml
file.
7. Update opa
In order to update opa, change your kubeopsctl.yaml
file and set opa: false
to opa: true
.
Please set other applications to false
before applying the kubeopsctl.yaml
file.