You can wait creation of k8s secret with:
kubectl wait --for=create secret my-new-secret --timeout=30s