Skip to content

Instantly share code, notes, and snippets.

@superseb
Created November 11, 2019 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superseb/2732303f0c85d6aca8fab617ea262ebb to your computer and use it in GitHub Desktop.
Save superseb/2732303f0c85d6aca8fab617ea262ebb to your computer and use it in GitHub Desktop.
Extract self signed CA certificate from Rancher
#!/usr/bin/env bash
CONTID=$(docker ps | grep -E "rancher/rancher:|rancher/rancher |rancher/rancher@|rancher_rancher" | awk '{ print $1 }')
docker exec $CONTID kubectl get listenconfigs cli-config -o jsonpath={.caCerts} > /tmp/cacerts
curl --cacert /tmp/cacerts https://localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment