在k8s上部署一个前后端分离的项目
编辑于 2021-09-10 00:14:08 阅读 4056
4台虚拟机
|节点|系统|IP|备注| |-|-|-|-|-| |master|CentOS-8|192.168.10.90|主节点| |node1|CentOS-8|192.168.10.91|节点1| |node2|CentOS-8|192.168.10.92|节点2| |NFS|CentOS-8|192.168.10.99|文件系统,用于存储项目文件及日志|
准备
一个前后端分离的项目
用户端(shop-h5):vue + vant
管理员端(shop-admin):vue + element ui
服务端(shop):php + mysql + nginx + redis
[root@nfsFileSystem vagrant]# ls /nfs/data/www/
shop shop-admin shop-h5
域名及证书文件
shop.cw.ltd.key
shop.cw.ltd.pem
配置文件
#pv/pvc
log-pv.yaml
log-pvc.yaml
www-pv.yaml
www-pvc.yaml
#nginx配置
nginx-configmap.yaml
#ingress
shop-ingress.yaml
#nginx
shop-nginx-deployment.yaml
shop-nginx-service.yaml
#php
shop-php-deployment.yaml
shop-php-service.yaml
#redis
shop-redis-deployment.yaml
shop-redis-service.yaml
#network
web-network.yaml