Created
October 27, 2019 23:25
-
-
Save adaRn/7dbbb9df99b96c6147488f83db82dbb1 to your computer and use it in GitHub Desktop.
Kubernetes YAML to deploy IPSec VPN server (statefulset)
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
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