Environments: Kubernetes deployment not found

Using Gitlab.com for this.

I have kubernetes, where I deploy my project. However, when I visit the environments tab I get error:

And when I do kubectl describe pod xxxx -n xxxx

Name:         production-6df8db4cd6-vbvpv
Namespace:    repo-14798554-production
Priority:     0
Node:         node-2/10.0.2.2
Start Time:   Mon, 20 Apr 2020 04:20:42 +0300
Labels:       app=production
              pod-template-hash=xxxxxx
              release=production
              tier=web
              track=stable
Annotations:  app.gitlab.com/app: group-repo
              app.gitlab.com/env: production
              checksum/application-secrets: xxxxxx

I cannot see anything to be wrong with these values. Am I missing something?

2 Likes

Did you find any solution or what was wrong with your manifests?

I have the same issue; everything is deployed to $KUBE_NAMESPACE and the two labels are set for all resources. Did you manage to fix your issue?

1 Like

Nope, and nobody really bothered even to dig the issue I created.

That’s a shame :frowning:

I’m 99% sure that I’ve set up everything correctly. The one last suspicion I had was that I’m using traefik’s IngressRoute instead of Ingress and that might be causing the deploy board to fail for some reason. So I migrated all ingresses:

From

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute

To

apiVersion: extensions/v1beta1
kind: Ingress

Sadly no luck. Still Kubernetes deployment not found :frowning:

Alright, update from my side: I found the issue. I had the two GitLab annotations configured as labels, which is of course wrong. I have now annotated my resources correctly and all works as expected :slight_smile:

I had the same error as OP, my fault was annotating (only) the pod template in the deployment. When also annotating the deployment itself it finally worked. (thus it also propagates down to the replica set, but not pods)