How to set up bitbucket pipelines docker deployment to kubernetes

Posted June 25, 2020 4.9k views

Ive been following this tutorial:

Is there anything I need to do in Digital Ocean kubernetes? I created a cluster, etc. But i keep getting this error message:

Error from server (Not Found): deployments.apps “proj1” not found

This is my bitbucket pipelines step

  • step: name: Deploy to Kubernetes image: atlassian/pipelines-kubectl script: - apk –no-cache add curl - curl -sL | tar -xzv - mv ./doctl /usr/local/bin - doctl -t $DOCTLTOKEN k8s cluster kubeconfig show staging-k8s-nyc1 > kubeconfig.yml - kubectl –insecure-skip-tls-verify –kubeconfig=kubeconfig.yml set image deployment/${BITBUCKETREPOSLUG} ${BITBUCKETREPO_SLUG}=proj1/staging:latest -v=8

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there!

I would check consider breaking that down step by step to see where/if any errors are being logged. Do you see a deployment after named proj1?

I would check all the namespaces kubectl get deployments -A

You may simply need to add a -n <namespace> option to your command. But it is quite difficult to triage in its current format.


John Kwiatkoski
Senior Developer Support Engineer - Kubernetes