您能建议如何解决我面临的问题吗?我正在尝试使用以下命令从 Kubernetes 进行转储:
kubectl exec auth-module -- bash -c "pg_dump -U pg-user database-name" > auth_database.sql
但是上面的命令返回错误:
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "d03940343fe6814b73186155bcb07812d51fe241be5fd3da02321d7922b31b8a": OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown
怎么了?预先感谢!
指定
/bin/sh
对我有用
kubectl exec auth-module -- /bin/sh -c "pg_dump -U pg-user database-name" > auth_database.sql