Connect to managed PostgreSQL with verify-full TLS
Connect through PgBouncer on port 6432 with the Yandex Cloud CA; verify-full uses root.crt to check the certificate and host name.
curl -s https://storage.yandexcloud.net/cloud-certs/CA.pem -o ~/.postgresql/root.crt && psql "host=<host> port=6432 sslmode=verify-full dbname=<name> user=<name> target_session_attrs=read-write"
- tool
- yc32 commands
More yc commands
-
yc managed-redis cluster list --format json | jq -r '.[] | select(.health!="ALIVE") | "\(.name)\t\(.status)\t\(.health)"'Show only Redis clusters that are not ALIVE, for a quick health check.
-
yc managed-clickhouse cluster list --format json | jq -r '.[] | "\(.name)\t\(.config.version)\t\(.resources.resourcePresetId)"'Check ClickHouse versions and presets to find clusters that need an upgrade.
-
yc iam access-key create --service-account-name <name> --format json | jq -r '"AWS_ACCESS_KEY_ID=\(.access_key.key_id)\nAWS_SECRET_ACCESS_KEY=\(.secret)"'Create an S3-compatible static key for a service account; the secret is shown only once, so save it right away.
-
aws --endpoint-url=https://storage.yandexcloud.net s3 sync ./dist s3://<name>/<id>/ --delete --exclude '*.map'Sync files to a Yandex Cloud bucket through the S3 API; --delete removes objects that no longer exist locally.
-
yc storage bucket list --format json | jq -r '.[] | "\(.name)\t\(.max_size/1073741824)GiB\t\(.default_storage_class)"'List buckets with their size limit in GiB and storage class.