Remote Kubernetes Gateway¶
Once you have Racetrack up and running somewhere, you might want to connect it to an external Kubernetes cluster to keep your Jobs there. In other words, you can distribute services between 2 separate infrastructures:
- Main Hub - hosting core Racetrack services
- Remote Jobs cluster - an infrastructure hosting jobs and remote Pub gateway.
To do that, you need to deploy Jobs gateway and configure infrastructure target. Remote Pub gateway protects Jobs from unauthorized access.
Requirements¶
- Python 3.8+ with
pip
andvenv
- kubectl (version 1.24.3 or higher)
- curl
Install Remote Gateway¶
Pick an installation directory:
mkdir -p ~/racetrack && cd ~/racetrack
sh <(curl -fsSL https://raw.githubusercontent.com/TheRacetrack/racetrack/master/utils/standalone-wizard/runner.sh)
remote-kubernetes
infrastructure target.
Install plugin¶
On your Racetrack's "Main Hub", install remote Kubernetes plugin. You can do it with:
racetrack plugin install github.com/TheRacetrack/plugin-remote-kubernetes
Next, fill plugin's configuration with the content that has been given to you by installer:
infrastructure_targets:
remote-k8s:
remote_gateway_url: 'http://1.2.3.4:7105/pub'
remote_gateway_token: '5tr0nG_PA55VoRD'
job_k8s_namespace: 'racetrack'
docker:
docker_registry: 'docker.registry.example.com'
username: 'DOCKER_USERNAME'
password: 'READ_WRITE_TOKEN'
After that, you should see a new infrastructure target available in Racetrack.