diff --git a/ca-bundle.sh b/ca-bundle.sh index d4111dd..cc30023 100755 --- a/ca-bundle.sh +++ b/ca-bundle.sh @@ -4,6 +4,5 @@ set -o nounset set -o pipefail ROOT=$(cd $(dirname $0)/../../; pwd) - -export CA_BUNDLE=$(kubectl get configmap -n kube-system extension-apiserver-authentication -o=jsonpath='{.data.client-ca-file}' | base64 | tr -d '\n') +export CA_BUNDLE=$(kubectl config view --raw --flatten -o json | jq -r '.clusters[] | select(.name == "'$(kubectl config current-context)'") | .cluster."certificate-authority-data"') cat manifest.yaml | envsubst > manifest-ca.yaml