Skip to content

Instantly share code, notes, and snippets.

@slaysd
Created March 24, 2020 01:04
Show Gist options
  • Save slaysd/ae6d76505a5343b985399965d6b6ee87 to your computer and use it in GitHub Desktop.
Save slaysd/ae6d76505a5343b985399965d6b6ee87 to your computer and use it in GitHub Desktop.
remove k8s openvpn on jx
#!/bin/bash
if [ $# -ne 2 ]
then
echo "Usage: $0 <CLIENT_KEY_NAME> <NAMESPACE>"
exit
fi
KEY_NAME=$1
NAMESPACE=$2
HELM_RELEASE=jx
POD_NAME=$(kubectl get pods -n "$NAMESPACE" -l "app=openvpn,release=$HELM_RELEASE" -o jsonpath='{.items[0].metadata.name}')
kubectl -n "$NAMESPACE" exec -it "$POD_NAME" /etc/openvpn/setup/revokeClientCert.sh $KEY_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment