Backup and upgrade your EKS cluster from version 1.17 to 1.18 with Velero and eksctl.

Tools used:

Velero

aws s3api create-bucket \
--acl private \
--bucket velero-bucket-eks-backup \
--region eu-west-1 \
—-create-bucket-configuration LocationConstraint=eu-west-1
aws iam create-user —-user-name velero
aws iam put-user-policy \
--user-name velero \
—-policy-name velero \
—-policy-document file://velero-policy.json
aws iam create-access-key \
—-user-name velero > velero-access-key.json
[default]
aws_access_key_id=AKIAXXX111222BBB444
aws_secret_access_key=V123AaaB456cCc789ddD012EeE345ffF678
wget https://github.com/vmware-tanzu/velero/releases/download/v1.5.3/velero-v1.5.3-darwin-amd64.tar.gz
tar -xvf velero-v1.5.3-darwin-amd64.tar.gz
cd velero-v1.5.3-darwin-amd64
sudo mv velero /usr/local/bin
velero version
velero install \
-—provider aws \
-—plugins velero/velero-plugin-for-aws:v1.1.0 \
-—bucket velero-bucket-eks-backup \
-—backup-location-config region=eu-west-1 \
-—snapshot-location-config region=eu-west-1 \
-—secret-file ./velero-credentials \
-—velero-pod-cpu-limit 2 \
-—velero-pod-mem-limit 4G
kubectl get all -n veleroNAME                          READY   STATUS    RESTARTS   AGE
pod/velero-54bdf48d57-hzmhz 1/1 Running 0 4d
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/velero 1/1 1 1 4d
NAME DESIRED CURRENT READY AGE
replicaset.apps/velero-54bdf48d57 1 1 1 4d

Optional step

wget https://github.com/rikatz/kubepug/releases/download/v1.1.3/kubepug_darwin_amd64.tar.gz
tar -xvf kubepug_darwin_amd64.tar.gz
cd kubepug_darwin_amd64
sudo mv kubepug /usr/local/bin
kubepug —-version
kubepug —-k8s-version=v1.18.9

Let’s backup

velero backup create staging-backup
velero backup describe staging-backup
velero backup logs staging-backup
eksctl version
brew install weaveworks/tap/eksctl
brew upgrade eksctl && brew link --overwrite eksctl
eksctl upgrade cluster —-name cicd-staging —-version=1.18
eksctl upgrade cluster —-name cicd-staging —-version=1.18 --approve
eksctl get nodegroups —-cluster cicd-stagingeksctl upgrade nodegroup —-name=cicd-staging-nodes —-cluster=cicd-staging —-kubernetes-version=1.18
eksctl utils update-kube-proxy —-cluster=cicd-stagingeksctl utils update-aws-node —-cluster=cicd-stagingeksctl utils update-coredns —-cluster=cicd-staging
--approve 

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store