카테고리 없음

helm install 할때 ingress.tls.source serect을 설정하는 방법

sherrylover 2023. 4. 11. 11:11
728x90
반응형

1. serect 에 인증서 저장

kubectl create secret tls my-tls-secret --key /path/to/my/tls.key --cert /path/to/my/tls.crt

 

 

 

2.yaml 에 secret 설정

 

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    # Configure TLS using a secret
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
  - secretName: my-tls-secret
  rules:
  - host: my-host.com
    http:
      paths:
      - path: /
        backend:
          serviceName: my-service
          servicePort: 80

 

 

  참고 https://ahnseungkyu.com/m/255?fbclid=IwAR1-_in0E4EbdpGLv0vKFavnf5DSrSy2IoO9tlRg1g_QN4sfzCoCRg9in88 

 

728x90
반응형