Skip to content

待办

  1. ClusterIP 的 service 有啥区别
  2. k8s ingress 的 pathType: ImplementationSpecific
  3. hpa 自动扩容

知识点总结:

  • systemd
  • github actions
  • kubernetes ingress/cm
  • springboot
  • hpa/ingress/cm/pv/pvc
  • kustomization
  • helm
  • 容器镜像服务 dockerhub/腾讯云/阿里云

落地页

conf
location / {
    root /usr/share/nginx/html;
    index index.html;
}

容器鉴权

sh
kubectl create secret docker-registry tencent-registry-secret \
 --docker-server=ccr.ccs.tencentyun.com \
 --docker-username=100006371794 \
 --docker-password=yang123321

mojito

  • 部署到集群
  • 自动化部署

https://api.pingcx.cn/mojito/v3/healthz Go -> 测试 API

systemd 服务

vodka-api

  • 自动化构建镜像
  • 部署到集群
  • 自动化部署

https://api.pingcx.cn/vodka/v1/healthz Go/Py -> 主站 API

sh
docker build -t vodka-api .

docker run -p 8080:8080 ccr.ccs.tencentyun.com/falconluca/vodka-api

rum-api

  • 自动化构建镜像
  • 部署到集群
  • 自动化部署

https://api.pingcx.cn/rum/v1/healthz Ja -> 其它 API

sh
docker build -t rum-apt .

docker run -d -p 8080:8080 --name rum rum-api

pingcx

  • 自动化构建镜像
  • 部署到集群
  • 自动化部署

https://pingcx.cn 主站

pingcx-lib

  • 自动化构建镜像
  • 部署到集群
  • 自动化部署

https://pingcx.cn/lib Nextjs 知识库

sh
docker build -t pingcx-lib .

docker run -p 3000:3000 ccr.ccs.tencentyun.com/falconluca/pingcx-lib:20251016104810

ing

  • pathType 的 Prefix 和 ImplementationSpecific 的区别

kustomization.yml

yaml
resources:
  - deploy.yml
  - svc.yml

images:
  - name: ccr.ccs.tencentyun.com/falconluca/vodka-api
    newTag: "123456"
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

执行

bash
kustomize edit set image ccr.ccs.tencentyun.com/falconluca/vodka-api=ccr.ccs.tencentyun.com/falconluca/vodka-api:6666666

输出

resources:
- deploy.yml
- svc.yml

images:
- name: ccr.ccs.tencentyun.com/falconluca/vodka-api
  newName: ccr.ccs.tencentyun.com/falconluca/vodka-api
  newTag: "6666666"
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization