Upgrading prokube⚓︎
The top-level UPDATING.md file contains specific instructions for upgrading from one version of prokube to another.
The general procedure for updating prokube deployments is as follows:
- Rebase your gitops branch (e.g.
gitops/dev), the target revision for ArgoCD to deploy to the latest release branch. - Push your changes to the appropriate branch (a
--force-with-leaseis usually needed). - If no other specific upgrade instructions are given, log into ArgoCD at (https://yourdomain.tld/argocd/) and refresh and sync all apps.
GitLab⚓︎
Updating GitLab is supported by prokube Ansible scripts. More info in infra/README.md
Procedure:
- Rebase your
infra/xxxbranch in infra to new master/feature branch. - Try updating GitLab. From your laptop cd to
ansible/gitlab_playbookand run:ansible-playbook --ssh-common-args="-i ~/.ssh/id_ed25519_xxx" --extra-vars="ansible_user='ansible' gitlab_runner_token='<token-used-to-register-gitlab-runner>'" -i ../inventory deploy.yaml --tags update_gitlab - If you encounter an error like this:
then you will have to update to an intermediate version first. You can do that by adjusting
gitlab preinstall: It seems you are upgrading from 16.5 to 16.8. gitlab preinstall: It is required to upgrade to the latest 16.7.x version first before proceeding.gitlab_version,gitlab_runner_versionandgitlab_agent_versioninansible/gitlab_playbook/group_vars/all.yamlandansible/microk8s_playbook/group_vars/all.yaml.
k8s⚓︎
- Commit changes from your rebasing above and push to GitLab
infra/xxxto deployment's GitLab. This will trigger redeployment of k8s. - Drain nodes as needed:
kubectl drain --ignore-daemonsets --delete-emptydir-data <node-name> kubectl uncordon <node-name> - Restart any pods that are stuck in a pending state because their PVC is on the wrong node.