/ibmcloud-openvpn-iks

OpenVPN running in Kubernetes cluster on IBM Cloud

Primary LanguageShell

OpenVPN running in Kubernetes cluster on IBM Cloud

Based on:

Deploy

./010-infrastructure.sh
./020-openvpn-config.sh
./030-openvpn-deploy.sh

Connect

Once everything is deployed, find the OpenVPN domain name with:

OPENVPN_DOMAIN_NAME=$(ibmcloud is load-balancers --output json | jq -r '.[] | select(.profile.family=="Network") | .hostname')
echo "OpenVPN domain is $OPENVPN_DOMAIN_NAME"

Start the OpenVPN client with:

openvpn --config config/client.ovpn --remote $OPENVPN_DOMAIN_NAME

From there you can access the nginx deployed in another namespace:

NGINX_IP=$(kubectl get service nginx-service --namespace sample-app -o json | jq -r .spec.clusterIP)
echo "NGINX Cluster IP is $NGINX_IP"
curl http://$NGINX_IP

Destroy

./100-openvpn-remove.sh
./110-infrastructure-destroy.sh