Per the docs for the pipe you're using(see the Prerequisite section):
In order to configure the credentials in Pipelines, you will need to
add the base64-encoded kubeconfig file as a Repository Variable. This
is how you can obtain it: on Linux base64 -w 0 < ~/.kube/config and on
Mac OS base64 < ~/.kube/config. Just copy the base64-encoded string
from stdout and put in into the KUBE_CONFIG variable in your
repository settings.
This pipe makes use of the kubeconfig file access method described here.
To outline this a little further, you'll need to:
Retrieve your kubeconfig file. Do this by using the digitalocean web console. Selecting the overview tab for your k8s cluster, you'll see a . Save this file to your local environment.
Convert the contents of that file to a base64-encoded string. From a terminal use the command base64 -w 0 <downloaded kube config file>
. Copy the resulting string to your clipboard.
Navigate to your bitbucket repository, select repository settings, and then select repository variables.
In the name field enter KUBE_CONFIG
and in the value field paste your base64-encoded config string from step 2. Select the secured box to make sure your config is obfuscated in your pipeline logs. (the name of this variable is arbitrary, fyi, it just needs to match your reference in the pipeline yaml)
This will create the repository variable $KUBE_CONFIG
, containing the base64-encoded value of your kube config file, which your pipeline uses to populate the variable KUBE_CONFIG
expected by the atlassian/kubectl-run pipe.