Running k6 in Google Cloud Run

Hi!

I’ve been trying to run the k6 docker image on Google Cloud Run about it doesn’t seem to work.

k6 does spin up an API service and listens to port 6565, so shouldn’t it be just to open this port in Google Cloud Run and when Google Cloud Run does it’s health checking the API will respond with a 200?

I must be missing something?

Hello and welcome!

I don’t think the default Docker image exposes any ports; you’d need to explicitly open them in docker-compose.yml. There’s an example about half-way down on this page.

1 Like

Hi! Thanks for the answer, it does expose it.

I did get it working so if anyone else sees this. When creating your own Docker image build from the k6 one make sure the address is set:

CMD [“run”, “–address”, “0.0.0.0:6565”, “load-test.mjs”]