Skip to content

Instantly share code, notes, and snippets.

@adaRn
Created October 27, 2019 23:25
Show Gist options
  • Save adaRn/7dbbb9df99b96c6147488f83db82dbb1 to your computer and use it in GitHub Desktop.
Save adaRn/7dbbb9df99b96c6147488f83db82dbb1 to your computer and use it in GitHub Desktop.
Kubernetes YAML to deploy IPSec VPN server (statefulset)
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
name: vpn
spec:
selector:
matchLabels:
app: vpn
serviceName: vpn
replicas: 1
template:
metadata:
labels:
app: vpn
spec:
containers:
- name: vpn
image: hwdsl2/ipsec-vpn-server
imagePullPolicy: Always
securityContext:
privileged: true
ports:
- containerPort: 500
hostPort: 500
name: vpn-isakmp
protocol: UDP
- containerPort: 4500
hostPort: 4500
name: vpn-ike
protocol: UDP
env:
- name: "VPN_IPSEC_PSK"
value: "presharedkey"
- name: "VPN_USER"
value: "user"
- name: "VPN_PASSWORD"
value: "password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment