0

AKS for Gitpod - JayZzz

 1 year ago
source link: https://www.cnblogs.com/JayZzzWh/p/17151444.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

------实习期间做的一个小项目 距今一个多月两个月-----------------

1.First Week

local k8s

命令行:kubectl ✅

运行Kubernetes: kind,minikube✅,kubeadm

first step: minikube(need Container or virtual machine manager) , wsl version one , docker <asssss-->The three are in conflict with each other . wsl 1挂在Windows NT内核之上的仿Linux 系统 .没有Linux内核 不支持原生的docker 不支持Docker守护线程. IO速度也很慢 具体表现在编译和解压方面

second step : in windows install ✅ , docker desktop,

third step: WSL2✅ 是有 Linux 内核的轻量化虚拟机,基于Hyper-V 的虚拟机技术支持 ,支持原生的docker

gitpod Local Preview❌ (memory,)

2.Second Week

first :aks✅-->learn container-instances ->pull static page from github

(原理:1. Create container image:git clone code ,docker build ,docker run 2. Create container registry -- az acr create ,获取容器注册表的完整登录服务器名称,标记 ,docker push到推送到注册表 3.Deploy appalication -- az container create ,az container show )

2850486-20230224143553264-1302132286.png

但是想通过container-instances 从github 拉取gitpod源码 ❌失败

2850486-20230224143634021-1895458037.png

second : first to install gitpod [www.gitpod.io/docs/configure/self-hosted/latest/installing-gitpod]

install the KOTS kubectl plugin

www.gitpod.io/docs/configure/self-hosted/latest/installing-gitpod

install Gitpod

kubectl kots install gitpod

最开始的架构:

2850486-20230224143755438-2017682517.png

2850486-20230224143807179-1541449293.png

2850486-20230224143819578-546021999.png

gitpod config : only to wirte domain name -- vote.whgitpod.com

learn cert-manager --dns01(cost 2days)

nslookup 域名也解析不了 dns 区域也没有传播 ❌

然后将cert-manager改为self-signed 方式

手动添加了A类型的记录集 前端地址(因为这个前端地址是gitpod的前端地址,刚开始安装完k8s这个是没有的)

2850486-20230224143839210-2027649215.png
2850486-20230224143850250-2047618359.png

勉强强卡BUG ,然后域名就可以打开了

之后就是Integrations 的问题。Registering a GitHub Enterprise Server。建好后最后在gitpod集成 认证的时候也会面临证书的问题❌ 。最后发现github.com官网可以用,不用自己搭建。

但是面临register的问题

2850486-20230224143919646-201456673.png

研究很久发现 开会说从头看官网教程 :发现我仅仅是个证明价值体系,也没成功

2850486-20230224143955812-980212514.png

少了这三个架构

2850486-20230224144016918-206826349.png
2850486-20230224144036261-1207374124.png

之后用Azure Cli 跟官网着敲 把没有的建出来。但原来的问题还是没解决 还报register的问题

2850486-20230224144059368-1037585426.png

这时候又尝试了gitpod官方文档 gitpod-io/gitpod-microsoft-aks-guide: Running Gitpod in Azure AKS (github.com)

由于不是Mac 使用的是wsl 但我用的wsl 一直有超过最大重试次数错误。 重启以及等待两天也不行

2850486-20230224144215245-1884445668.png

最后发现下面有setup.sh 文件 运用setup.sh 操作。但还是有错误

2850486-20230224144231845-914368832.png
2850486-20230224144243124-734889808.png

。应该是wsl问题 。使用vm ware可以执行。

最简单的就是.sh 脚本。亲测试 20分钟就可以实现Running Gitpod in AKS 并访问到了填写的domain name (具体还看机器网络情况)。

2850486-20230224144306338-69092975.png

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK