When following the example documentation for azure environments deployments the Deploy to Kubernetes cluster step will fail on the error
no matches for kind "Deployment" in version "apps/v1beta1"
which is due to the default aks version as of time of writing using kubernetes 1.16 which takes Deployment out of version apps/v1beta1 and into apps/v1
kubernetes versions have been updated making the ./manifests/deployment.yml out of date. it currently
update the ./manifests/deployment.yml to reference apps/v1 instead of apps/v1beta1 adn add a selector field that matches the template metatdata label. example:
#./manifests/deployment.yml
apiVersion : apps/v1
kind: Deployment
metadata:
name: raboleypipelinesjavascriptdocker
spec:
replicas: 1
selector:
matchLabels:
app: raboleypipelinesjavascriptdocker
template:
metadata:
labels:
app: raboleypipelinesjavascriptdocker
spec:
containers:
- name: raboleypipelinesjavascriptdocker
image: rabenvcr.azurecr.io/raboleypipelinesjavascriptdocker
ports:
- containerPort: 8080
Pin the version the kubernetes cluster will use, and then update the Deployment version to whatever works in that version. and update the deployment.yml example manifest generated to use the correct syntax.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I have raised a fix to the azure devops template so that the starter template creates an updated apps/v1 deployment. It will take around two weeks to rollout to all regions. I have also a raised a fix on the docs page itself. @msebolt can we close this issue?
Most helpful comment
I have raised a fix to the azure devops template so that the starter template creates an updated
apps/v1deployment. It will take around two weeks to rollout to all regions. I have also a raised a fix on the docs page itself. @msebolt can we close this issue?