we’re using Gitlab CI/CD on gitlab.com with a connected Kubernetes cluster. Until recently, we ran on Azure, but have now decided to switch over to digitalocean. When I run our build / deploy pipeline now on our fresh cluster, I’m getting this error in the “production” job:
$ auto-deploy deploy secret/production-secret replaced Deploying new release... Release "production" does not exist. Installing it now. Error: validation failed: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1" ERROR: Job failed: exit code 1
After doing some googling, I found this release announcement for Kubernetes 1.16, which states that the Deployment resource has been moved up from extensions/v1beta1 to (eventually) apps/v1:
The Kubernetes version used on digitalocean is indeed 1.16.2. I do not recall the version we used on Azure, but judging from the article’s date, the 1.16 release is somewhat recent (September 2019).
My question is this: Am I right in assuming that this issue is caused by Gitlab’s CI/CD using a pre-1.16 notation to automatically create Deployments on Kubernetes clusters? If so, how can I adapt the deployment script to use the apps/v1 scope?