kubernetes(k8s)集群超级详细超全安装部署手册 - 知乎
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
您可以在虚拟机和裸机上安装 KubeSphere,并同时配置 Kubernetes。另外,只要 Kubernetes 集群满足以下前提条件,那么您也可以在云托管和本地 Kubernetes 集群上部署 KubeSphere。
kubectl get sc
进行确认)。kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/kubesphere-installer.yaml
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/cluster-configuration.yaml
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f
docker run -e REGISTRY_STORAGE_DELETE_ENABLED="true" --name registry -p 5000:5000 -v /data/registry:/var/lib/registry -d registry:2.6.2
docker push 192.168.186.128:5000/ruoyi-admin:v3.8.7
#打包
FROM openjdk:8u342-jre
WORKDIR /app/ruoyi
COPY ruoyi-admin.jar .
EXPOSE 8080
ENTRYPOINT ["java","-jar","/app/ruoyi/ruoyi-admin.jar"]
docker rmi --force `docker images | grep ruoyi-admin | awk '{print $3}'`
docker rmi $(docker images -aq --filter "dangling=true")
docker build -t ruoyi-admin:v3.8.7 .
#修改镜像tag
docker tag ruoyi-admin:v3.8.7 192.168.186.128:5000/ruoyi-admin:v3.8.7
#推送到私有镜像仓库中
docker push 192.168.186.128:5000/ruoyi-admin:v3.8.7
#部署到k8s
kubectl apply -f svc-ruoyi-admin.yaml
FROM nginx:1.22
WORKDIR /app/ruoyi-ui
COPY dist .
EXPOSE 80
docker rmi --force `docker images | grep ruoyi-ui | awk '{print $3}'`
docker rmi $(docker images -aq --filter "dangling=true")
docker build -t ruoyi-ui:v3.8.7 .
#修改镜像tag
docker tag ruoyi-ui:v3.8.7 192.168.186.128:5000/ruoyi-ui:v3.8.7
#推送到私有镜像仓库中
docker push 192.168.186.128:5000/ruoyi-ui:v3.8.7
#部署到k8s
kubectl apply -f svc-ruoyi-ui.yaml
5.整体流程参考
kubernetes(k8s)集群超级详细超全安装部署手册 - 知乎
在 Kubernetes 上安装 KubeSphere
Kubernetes入门实操—部署若依前后端分离版(Ruoyi-Vue)_哔哩哔哩_bilibili
Kubernetes入门实操—部署若依前后端分离版(Ruoyi-Vue)_哔哩哔哩_bilibili
IDEA 使用系列之 Alibaba Cloud Toolkit 一件部署-CSDN博客