I guess sh export
makes shell to assume export as a filename (some script that shell will run). Hence the error can't open 'export': No such file or directory
.
Try to make use of -c
option.
kubectl_winpty exec -it vault-0 -n vault-xxx -- sh -c "export VAULT_CACERT=/vault/userconfig/vault-tls/vault.ca"
Also it's better to set env variable when you create this pod.
Also make sure your pod is healthy and in ready state, which is not the case as per kubectl get
output.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…