How to set up bitbucket pipelines docker deployment to kubernetes

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 $DOCTL_TOKEN k8s cluster kubeconfig show staging-k8s-nyc1 > kubeconfig.yml - kubectl --insecure-skip-tls-verify --kubeconfig=kubeconfig.yml set image deployment/${BITBUCKET_REPO_SLUG} ${BITBUCKET_REPO_SLUG}=proj1/staging:latest -v=8

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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