mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
878 B
878 B
Check Pods can connect to external DBs
Table of contents
TL;DR
-
Get a shell on a test container.
kubectl run --generator='run-pod/v1' --image 'alpine' -it --rm \ --limits 'cpu=200m,memory=512Mi' --requests 'cpu=200m,memory=512Mi' \ ${USER}-mysql-test -- sh -
Install the utility applications needed for the tests.
apk --no-cache add 'mysql-client' 'netcat-openbsd' -
Test basic connectivity to the external service.
nc -vz -w3 '10.0.2.15' '3306' -
Test application connectivity.
mysql --host '10.0.2.15' --port '3306' --user 'root'