With Sauce Connect Helm chart you can easily run Sauce Connect Proxy version 5 in Kubernetes.
The repo contains a reference Helm chart. It can be used to deploy the Sauce Connect Proxy to Kubernetes.
To use this chart:
config:
region: us-west
username: johndoe
access-key: "xxx-xxx-xxx"
tunnel-name: "my-k8s-tunnel"
For more information about the configuration options, see the sc run command reference.
helm repo add saucelabs https://opensource.saucelabs.com/helm-charts
helm install sauce-connect saucelabs/sauce-connect --values /path/to/values.yaml --set config.tunnel-name=your-pool-name --set tunnelPoolSize=2
Use the following commands in order to get the application logs:
kubectl logs -l "app.kubernetes.io/name=sauce-connect" --tail -1 -f
The output should look like this:
2023/10/04 17:19:53 [tunnel] [INFO] established connection to Sauce Connect server active=1/2
2023/10/04 17:19:54 [tunnel] [INFO] established connection to Sauce Connect server active=2/2
2023/10/04 17:19:54 [control] [INFO] Sauce Connect is up, you may start your tests
The terminationGracePeriodSeconds
is set to 600 seconds to allow sufficient time for jobs using the Sauce Connect Proxy to finish.
It is recommended to adjust this value according to your tests typical duration.