Skip to main content

Use Services

This tutorial explains how to set up and use services whlie running a job

Assumed Scenario

Use MySQL service while running job

How to Set Up

  1. Define mysql service in Services tab like below:

    Define Mysql Service

    Note that for MySQL root password, we are referencing secret db-password defined in this tutorial

  2. Use defined service in relevant jobs as below:

    Use Mysql Service

  3. If the job runs with a Kubernetes executor and if you want to run MySQL service on particular nodes, configure service locator in section More Settings of the executor like below:

    Service Locator

  4. Now in command steps of the job you may connect to database via host name mysql (same as service name)