expire_on : 20230101
$ az login -t your.onmicrosoft.com
$ pwd
/Users/ssli/share/git/aap-azurerm/tools/utils
$ ./create_jump_vm.py
/ # nc -vz ssli-postgres.postgres.database.azure.com 5432
ssli-postgres.postgres.database.azure.com (10.226.0.4:5432) open
nc -vz 1.2.3.4 53
-v:显示更多信息
-z:只扫描主机和端口,无需建立连接,53端口一般用于dns服务
$ kubectl run pg-client --image postgres:latest --command -- sleep 3600
$ k exec -it pg-client -- /bin/sh
# psql -h ssli-postgres.postgres.database.azure.com -U ssli -d postgres
Password for user ssli:
psql (15.3 (Debian 15.3-1.pgdg120+1), server 13.10)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.
postgres=>
LEo at 00:12