푸잉이의 기술블로그
[Day19] Certified Kubernetes Administrator (CKA) with Practice Tests 본문
[Day19] Certified Kubernetes Administrator (CKA) with Practice Tests
data고수 2023. 1. 27. 02:39226강. Ingress
외부에서 클러스터 내부에 있는 서비스로 접속하기 위한 object
주로 단일 url 사용하여 접속
사용이유
-외부요청 라우팅
-가상 호스트 기반의 요청처리
-SSL/TLS 보안 연결처리
구조: 외부에서 요청을 받는 Gateway 역할, Ingress에 접속하면 미리 설정한 routing rule에 따라 작동
if) Ingress를 사용하지 않을 때,
외부 요청 처리 선택지 NodePort, ExternalIP 등
-> Layer 4(TCP, UDP)에서 요청을 처리-> 세부적인 처리 로직 구현하기엔 한계 존재
if) Ingress 사용,
Layer 7에서 요청을 처리할 수 있음
외부로부터 들어오는 요청에 대한 로드밸런싱, TLS/SSL 인증서 처리, 특정 HTTP 경로의 라우팅 등 Ingress를 통해 자세하게 정의 가능
Ingress Controller : Ingress 안에 정의해둔 자원 규칙들을 실제로 동작하게 해주는 것
-서비스 노출시켜 제공하려면 ingress 사용 o
<Ingress 생성>
nginx ingress controller 생성
ingress 규칙 생성: 외부 네트워크 요청에 대한 처리를 정의
ingress controller에 접근하기 위한 endpoint ip 설정
227강.
k8s version 1.20+
Format - kubectl create ingress <ingress-name> --rule="host/path=service:port"
예시)
Example - kubectl create ingress ingress-test --rule="wear.my-online-store.com/wear*=wear-service:80"
230강. Ingress-Annotations and rewrite-target
annotation을 통해 Ngnix Ingress controller의 설정 값들을 변경할 수 있음
Rewrite Target
:Ingress 규칙을 작성하다보면 path에 따라 서비스 나눔
xxx.com/something 접속 -> http-svc 서비스로 redirect 됨
but, 내부 서비스에서 하위 주소를 입력하여 서비스 내에서도 다른 페이지를 보여주어야하는 경우 404 에러 발생
rewrite-target:/ 은 /echo-name으로 들어오는 모든 요청을 hostname-service의 path로 전달하겠다는 의미
watch appl display the video streaming webpage
-> http
출처)
[쿠버네티스] 인그레스란?
Ingress는 외부에서 클러스터 내부에 있는 서비스로 접속하기 위한 오브젝트입니다. 주로 HTTP로 접속합니다Ingress의 주요 기능은 아래와 같습니다.Ingress의 기본적인 구조입니다. 외부에서의 요청
velog.io
https://gruuuuu.github.io/cloud/ingress-annotations/
Nginx Ingress Controller Annotations - Rewirte
Overview 여러 annotation을 통해 Nginx Ingress Controller의 설정값들을 변경할 수 있습니다. -> 전체 Annotation 이번문서에서는 여러 Annotation 중 url rewrite에 관련된 annotation에 대해서 알아보겠습니다. -> Annotat
gruuuuu.github.io