vpn

2022-04-18  本文已影响0人  小小的小帅

文件下载:


我的百度云.png
  1. openvpn服务端部署:
kubectl apply -f openvpn.yaml -n hips-dev
  1. 下载配置和客户端手册:
    http://192.168.16.144:1180/
  2. k8s节点客户端部署(每个k8s节点都需要安装客户端
yum -y install epel-release
yum -y install openvpn
mkdir -p /etc/openvpn/client/
cd /etc/openvpn/client/
client
dev tun
proto tcp
remote 192.168.16.144 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "/etc/openvpn/client/ca.crt"
cert "/etc/openvpn/client/handvpn1.crt"
key "/etc/openvpn/client/handvpn1.key"
remote-cert-tls server
tls-auth "/etc/openvpn/client/ta.key" 1
comp-lzo
verb 5

cat handvpn1.ovpn 
nohup openvpn handvpn1.ovpn >>handvpn1.log &
  1. 暴露服务端口,新建svc名字和注册中心相同:
kubectl expose deployment -n hips-dev hippius-admin --name=hzero-admin
kubectl expose deployment -n hips-dev hippius-app-manage --name=hippius-app-manage
kubectl expose deployment -n hips-dev hippius-device --name=hippius-device
kubectl expose deployment -n hips-dev hippius-file --name=hzero-file
kubectl expose deployment -n hips-dev hippius-gateway --name=hzero-gateway
kubectl expose deployment -n hips-dev hippius-iam --name=hzero-iam
kubectl expose deployment -n hips-dev hippius-im --name=hzero-im
kubectl expose deployment -n hips-dev hippius-message --name=hzero-message
kubectl expose deployment -n hips-dev hippius-platform --name=hippius-platform
kubectl expose deployment -n hips-dev hippius-pushcenter --name=hippius-pushcenter
kubectl expose deployment -n hips-dev hippius-register --name=hzero-register
kubectl expose deployment -n hips-dev hippius-statistics --name=hippius-statistics
kubectl expose deployment -n hips-dev hippius-submenu --name=hippius-submenu
kubectl expose deployment -n hips-dev hippius-swagger --name=hzero-swagger
kubectl expose deployment -n hips-dev hips-oauth --name=hzero-oauth
kubectl expose deployment -n hips-dev hzero-platform --name=hzero-platform
  1. 修改本地host: w+r drivers
10.244.109.70 hippius-app-manage
10.244.118.197 hippius-device
10.244.70.241 hippius-platform
10.244.85.194 hippius-pushcenter
10.244.85.132 hippius-statistics
10.244.104.24 hippius-submenu
10.244.117.84 hzero-admin
10.244.100.114 hzero-file
10.244.71.250 hzero-gateway
10.244.90.90 hzero-iam
10.244.114.131 hzero-im
10.244.67.0 hzero-message
10.244.115.113 hzero-oauth
10.244.103.1 hzero-platform
10.244.100.187 hzero-register
10.244.106.135 hzero-swagger
  1. 启动服务:
spring.application.name=hippius-app-manage-10129;
hzero.service.current.name=hipsam-10129;
hzero.service.current.path=/hipsam-10129/**;
hzero.service.current.service-name=hippius-app-manage-10129;
SPRING_DATASOURCE_URL=jdbc:mysql://192.168.16.144:30306/hippius_app_manage?useUnicode=true&characterEncoding=utf-8&useSSL=false;

EUREKA_DEFAULT_ZONE=http://11.11.11.16:30372/eureka;
SPRING_DATASOURCE_USERNAME =root;
SPRING_DATASOURCE_PASSWORD=xxx;
SPRING_REDIS_HOST=192.168.16.144;
SPRING_REDIS_PORT=30379;
SPRING_REDIS_PASSWORD=;
EUREKA_DEFAULT_ZONE=http://192.168.16.144:30193/eureka;
EUREKA_INSTANCE_PREFER_IP_ADDRESS=true;
eureka.instance.ip-address=10.8.0.6
SPRING_DATASOURCE_URL=jdbc:mysql://192.168.16.144:30306/hippius_app_manage?useUnicode\\\=true&characterEncoding\\\=utf-8&useSSL\\\=false
上一篇 下一篇

猜你喜欢

热点阅读