Pushing & running

How to push tasks to your registry so that they can later be run on Kubernetes.

Pushing

Before you can run anything on kubernetes, your task image must be pushed to a docker registry that can be accessed from the cluster. To push the image to a repository, you must define the image name in cowait.yml.

my-project/
  ├── cowait.yml
  ├── hello.py
  ├── requirements.txt
  └── sleep.py
cowait.yml
version: 1
cowait:
  image: your-repo/task-image-name
  1. Build your tasks into your image
cowait build
  1. Make sure you're authenticated to your registry.
docker login
  1. Push the image

This will push the image to registry you defined in your cowait.yml

cowait push

Configuring Pull Secrets

If your repository is not publicly available, you must create a kubernetes secret containing the authentication information. See the kubernetes documentation.

Once you have created a secret, configure the kubernetes provider to use it for pulling images:

cowait.yml
version: 1
cowait:
  kubernetes:
    pull_secrets:
      - your_secret_name

Running

You should now be ready to run your task on the your cluster. To use the kubernetes task provider, simply use the --provider option to cowait run as follows. You may pass inputs and other options as you would normally.

cowait run your_task --provider kubernetes

Found incorrect information, typos or have other suggestions to this documentation page?

Edit on Github