Is there a way to run the Vertica CE docker image as a Pod in k8s?
My company doesn't use Vertica, but we have a feature that lets users connect to it. So we have some automated tests that test the connection between our backend and a Vertica docker container. Right now we're just running it with docker-compose and it works out of the box with this snippet:
test-vertica: image: 'vertica/vertica-ce:11.0.0-0' networks: - connector-network-test
Now we want to move these tests onto k8s, as in just spin up a deployment with a service for Vertica before the tests run, and spin up another Pod to act as the backend that will run the tests and hit the Vertica deployment, and scrap everything when we're done. This is supposed to be super light weight so I don't really want to use the vertica helm chart for this, if I can just get it working on k8s with that image that just worked out of the box for docker-compose that would be perfect. Running the Vertica deployment in privileged mode worked fine until the last bit of the docker_entrypoint.sh:
... Time: First fetch (1 row): 54.396 ms. All rows formatted: 54.425 ms Rows Loaded ------------- 200 (1 row) Time: First fetch (1 row): 21.701 ms. All rows formatted: 21.742 ms vsql:vmart_load_data.sql:37: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. vsql:vmart_load_data.sql:37: connection to server was lost Running ETL ... vsql: could not connect to server: Connection refused Is the server running on host "???" and accepting TCP/IP connections on port 5433? Confirm successful load vsql: could not connect to server: Connection refused Is the server running on host "???" and accepting TCP/IP connections on port 5433? Starting MC agent Vertica is now running
This is the relevant part of my Vertica k8s deployment:
... Containers: test-vertica: Image: vertica/vertica-ce:11.0.0-0 Port: 5433/TCP Host Port: 0/TCP Limits: cpu: 1 memory: 512Mi Requests: cpu: 10m memory: 90Mi Environment: POD_HOST_IP: (v1:status.hostIP) POD_IP: (v1:status.podIP) POD_NAME: (v1:metadata.name) POD_NAMESPACE: (v1:metadata.namespace) POD_NODE_NAME: (v1:spec.nodeName) POD_SERVICE_ACCOUNT: (v1:spec.serviceAccountName) POD_UID: (v1:metadata.uid) Mounts: <none> Volumes: <none>
I checked the config files in the Vertica container in both the k8s deployment and when it runs in docker-compose, and they look the same, so I'm not sure why it doesn't work when it's running as a Pod on k8s. Any help is appreciated! Thanks in advance.