xiaolee 大佬有话说 : 2020-4-1 16:46:42
okteto宝塔折腾教程来啦!!
本帖最后由 xiaolee 于 2020-4-1 17:25 编辑
一些说明:由于现在没法直接容器部署,所以第一步要麻烦一点,需要下载okteto 及 kubectl
okteto下载地址:https://downloads.okteto.com/cli/okteto.exe
kubectl下载地址:https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/windows/amd64/kubectl.exe
其他平台请查看https://okteto.com/docs/getting-started/index.html
https://kubernetes.io/docs/tasks/tools/install-kubectl/
一、宝塔安装:
1、cli登录
okteto login
okteto namespace
2、新建一个文件.yml如bt.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: bt-app
spec:
replicas: 1
selector:
matchLabels:
app: bt-app
template:
metadata:
labels:
app: bt-app
spec:
containers:
– image: pch18/baota:clear
name: bt-app
—
apiVersion: v1
kind: Service
metadata:
name: bt-app
annotations:
dev.okteto.com/auto-ingress: "true"
spec:
type: ClusterIP
ports:
– name: "http-port-tcp"
port: 8888
selector:
app: bt-app
3、提交
kubectl apply -f bt.yml
等待完成即可, 登录地址:自动生成 用户名:username 密码password
二、建站反代
1、新增Repositories https://charts.bitnami.com
2、新建Applications选择nginx修改部分配置
https://cdn.jsdelivr.net/gh/BugF/IMG/2020/04/01/5e8453aa47c67.png
反代的为刚才宝塔服务的内网地址,我已在宝塔中安装了nginx
https://bt-app-nobibee.cloud.okteto.net/
https://nginx-nobibee.cloud.okteto.net/
有点麻烦且无聊,主要是折腾。——一位合格的MJJ,能免费的东西,坚决不出钱。
—————————————————————————————————————
更新:okteto挂掉了
安装其他镜像的说明:将bt.yml文件的name随意更换,image: pch18/baota:clear 更换为其他容器,port: 8888
端口改为容器内暴露端口,重新推送就是
kubectl apply -f ****.yml
qqq409640976 大佬有话说 :
还记得我昨天说,你的方法挺不了一天吧(9楼):lol
速速来围观正宗演示站点;P
https://www.hostloc.com/thread-666705-1-1.html
woniu 大佬有话说 : 2020-4-1 16:47:48
厉害了 老铁 值好几块的帖子
一个不知名网友 大佬有话说 : 2020-4-1 16:47:50
多谢分享,收藏了嗷哈哈哈
xiao 大佬有话说 : 2020-4-1 16:48:50
前排顶帖,牛逼:lol
mlc 大佬有话说 : 2020-4-1 16:49:17
进收藏夹吃灰吧yc011t
idmi 大佬有话说 : 2020-4-1 16:50:13
大佬能出个V2的酷么
hiing 大佬有话说 : 2020-4-1 16:52:13
感谢。
b66667777 大佬有话说 : 2020-4-1 16:52:55
感谢分享
qqq409640976 大佬有话说 : 2020-4-1 16:53:35
不错,已经入门了,这样的宝塔,一天打回原型:L
savior 大佬有话说 : 2020-4-1 17:00:17
前排求大佬弄个Bitwarden教程yc016t