向阳

k8s 添加默认证书

  • 2025-06-29 17:09:48
  • 0 star
  • 52 view
  • updated: 2025-06-29 17:34:57

创建密钥

kubectl create secret tls default-tls \
--cert=bocloud.local.crt \
--key=bocloud.local.key \
-n ingress-nginx

增加配置

vi yaml/ingress-nginx/controller-v1.10.1/deploy.yaml
apiVersion: apps/v1
kind: Deployment
spec:
  template:
    spec:
      containers:
      - args:
      - --default-ssl-certificate=$(POD_NAMESPACE)/default-tls
Tags:

Blog with 向阳 [email protected]

粤ICP备2020128944号