Created
December 15, 2022 23:50
-
-
Save matt-dres/f9048ddd4600f1c63f834ea98e914f21 to your computer and use it in GitHub Desktop.
Download & install selfsigned certs from TAP onto macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
##### | |
# Simple bash script to retrieve the selfsigned cert from TAP and install it locally on macOS | |
##### | |
echo "--- Fetching TAP Ingress Certificate ---" | |
kubectl get secret -n cert-manager tap-ingress-selfsigned-root-ca -o yaml | yq '.data."ca.crt"' | base64 -d > ca.crt | |
### Use the openssl command below to verify the cert if issues arise | |
# echo "--- Verifying Certificate ---" | |
# openssl x509 -in ca.crt -text -noout | |
echo "--- Adding to System.keychain (Mac password required) ---" | |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt | |
echo "--- TAP Ingress Certificate added to System.keychain ---" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment