加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ovpn0-Deployment.yaml 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
apiVersion: v1
kind: Service
metadata:
name: ovpn0
namespace: ovpn
labels:
app: ovpn0
spec:
ports:
- port: 1194
targetPort: 1194
nodePort: 31304
protocol: UDP
name: openvpn
selector:
app: ovpn0
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ovpn0
namespace: ovpn
labels:
app: ovpn0
track: stable
spec:
strategy:
type: RollingUpdate
template:
metadata:
labels:
name: openvpn
app: ovpn0
spec:
containers:
- image: kylemanna/openvpn
name: ovpn
ports:
- containerPort: 1194
name: openvpn
protocol: UDP
securityContext:
capabilities:
add:
- NET_ADMIN
volumeMounts:
- name: ovpn0-key
mountPath: /etc/openvpn/pki/private
- name: ovpn0-cert
mountPath: /etc/openvpn/pki/issued
- name: ovpn0-pki
mountPath: /etc/openvpn/pki
- name: ovpn0-conf
mountPath: /etc/openvpn
- name: ccd0
mountPath: /etc/openvpn/ccd
volumes:
- name: ovpn0-key
secret:
secretName: ovpn0-key
defaultMode: 0600
- name: ovpn0-cert
secret:
secretName: ovpn0-cert
- name: ovpn0-pki
secret:
secretName: ovpn0-pki
defaultMode: 0600
- name: ovpn0-conf
configMap:
name: ovpn0-conf
- name: ccd0
configMap:
name: ccd0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化