diff --git a/harbor/Harbor.md b/harbor/Harbor.md new file mode 100644 index 0000000..6497520 --- /dev/null +++ b/harbor/Harbor.md @@ -0,0 +1,48 @@ +需要安装docker和docker-compose +[https://goharbor.io/docs/2.9.0/install-config/](https://goharbor.io/docs/2.9.0/install-config/) +# docker-compose +```shell +# 下载 +wget https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-linux-x86_64 +# 设置可执行权限 +chomd +x docker-compose-linux-x86_64 +# 移动文件到 +mv docker-compose-linux-x86_64 /usr/bin/docker-compose +# 查看版本 +docker-compose -v +``` +# 安装harbor +```shell +wget https://github.com/goharbor/harbor/releases/download/v2.8.3/harbor-offline-installer-v2.8.3.tgz +# 修改配置文件 +harvor.yml +# 修改hostname +# 注销https +# 准备执行 +./prepare +# 安装 +./install +``` + +# 启动 +https://goharbor.io/docs/2.9.0/install-config/run-installer-script/ +``` +# pwd +/software/harbor +# 启动 +docker-compose up -d +# 停止 +docker-compose down -v +``` + +# push镜像使用http +``` +# 修改配置文件 +vi /etc/docker/daemon.json +{ +"insecure-registries": ["hy-node4:80"], +"exec-opts": ["native.cgroupdriver=systemd"] +} +# 如果还是不行使用registry +docker run -d -p 5000:5000 --restart=always --name registry registry:2 +``` diff --git a/k8s/img/微信截图_20230922224028.png b/k8s/img/微信截图_20230922224028.png new file mode 100644 index 0000000..97acd14 Binary files /dev/null and b/k8s/img/微信截图_20230922224028.png differ diff --git a/k8s/img/微信截图_20230922225230.png b/k8s/img/微信截图_20230922225230.png new file mode 100644 index 0000000..c553511 Binary files /dev/null and b/k8s/img/微信截图_20230922225230.png differ diff --git a/k8s/port.md b/k8s/port.md new file mode 100644 index 0000000..4ffbd9f --- /dev/null +++ b/k8s/port.md @@ -0,0 +1,23 @@ +nodeport +clusterid +headlss +service + +开发人员访问路径 +![](img/微信截图_20230922225230.png) +用户访问服务实例 +![微信截图_20230922224028.png](img/微信截图_20230922224028.png) + +常用服务暴露插件 +- nginx-ingress 测试版,重量级 +- traefik 反向代理,负载均衡,webui + + +traefik-ds.yml +traefik-rbac.yml +trarfik-ui.yml + + +修改ingress两种方法 +1. 修改yaml文件 +2. kubectl edit ingerss nginx -n default \ No newline at end of file