0Pricing
Docker & Kubernetes for Developers · 강의

TLS 종료 및 HTTPS로 Ingress 보호하기

Ingress에서 TLS를 구성하고 인증서를 Secret으로 저장하며 cert-manager로 발급을 자동화해 HTTPS로 트래픽을 제공해 보세요.

TLS 종료 및 HTTPS로 Ingress 보호하기은(는) CoddyKit의 무료 Docker & Kubernetes for Developers 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Docker & Kubernetes for Developers 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Docker & Kubernetes for Developers 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why TLS at the Ingress

Terminating TLS at the Ingress lets one place handle HTTPS for many backend services, so internal apps can stay plain HTTP while users get encryption.

Certificates Live in Secrets

An Ingress references a TLS certificate stored in a Kubernetes Secret of type kubernetes.io/tls, holding a tls.crt and tls.key.

kubectl create secret tls my-tls \
  --cert=tls.crt --key=tls.key

Adding a tls Block to Ingress

The spec.tls section maps hostnames to the secret that secures them.

spec:
  tls:
    - hosts:
        - app.example.com
      secretName: my-tls
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 80

How Termination Works

The Ingress controller decrypts incoming HTTPS, then forwards plain HTTP to the backend Service inside the cluster network.

The Certificate Renewal Problem

Certificates expire. Renewing and re-uploading them by hand is error prone, which is why automation tools exist.

Introducing cert-manager

cert-manager is an add-on that watches Ingress/Certificate resources and automatically obtains and renews certificates from issuers like Let us Encrypt.

Defining a ClusterIssuer

A ClusterIssuer tells cert-manager how to get certificates cluster-wide.

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email: admin@example.com
    privateKeySecretRef:
      name: letsencrypt-prod
    solvers:
      - http01:
          ingress:
            class: nginx

Annotating the Ingress

Add an annotation so cert-manager issues a cert and stores it in the named secret automatically.

metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod

HTTP-01 vs DNS-01

HTTP-01 proves domain ownership by serving a token over HTTP; DNS-01 proves it via a DNS TXT record and supports wildcard certificates.

Forcing HTTPS Redirects

Most controllers redirect HTTP to HTTPS by default. With NGINX you can control it via an annotation.

metadata:
  annotations:
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"

Verifying the Certificate

Check the Certificate resource and inspect the served cert.

kubectl get certificate
openssl s_client -connect app.example.com:443

Quick Check

Test what you have learned.

Recap

You learned to terminate TLS at the Ingress using a tls Secret, automate issuance and renewal with cert-manager and a ClusterIssuer, choose HTTP-01 vs DNS-01, and force HTTPS redirects.

자주 묻는 질문

“TLS 종료 및 HTTPS로 Ingress 보호하기” 강의는 무료인가요?

네 — “TLS 종료 및 HTTPS로 Ingress 보호하기” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Docker & Kubernetes for Developers 강의 전체를 잠금 해제할 수 있습니다. Docker & Kubernetes for Developers 강의에는 총 4개의 강의가 포함되어 있습니다.

“TLS 종료 및 HTTPS로 Ingress 보호하기”에서 뭘 배우나요?

Ingress에서 TLS를 구성하고 인증서를 Secret으로 저장하며 cert-manager로 발급을 자동화해 HTTPS로 트래픽을 제공해 보세요. 브라우저에서 직접 실행하는 실습 코드로 Docker & Kubernetes for Developers을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Docker & Kubernetes for Developers을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Docker & Kubernetes for Developers은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“TLS 종료 및 HTTPS로 Ingress 보호하기” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Docker & Kubernetes for Developers 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Docker & Kubernetes for Developers 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. Kubernetes Ingress 및 라우팅
  2. 네트워크 정책 구현
  3. K8s 서비스 검색 및 DNS
  4. TLS 종료 및 HTTPS로 Ingress 보호하기
← Docker & Kubernetes for Developers(으)로 돌아가기