Skip to main content

Kubeflow 서비스 문제 해결

Kubeflow 서비스 사용 중 발생할 수 있는 문제와 해결 방법을 안내합니다.


KServe 인증 문제 해결

Kubeflow 환경의 KServe는 기본적으로 Dex 인증을 요구합니다. 따라서 인증 세션 authservice_session 쿠키 또는 적절한 인증 헤더 없이 InferenceService 엔드포인트를 호출하면 403 Forbidden 오류가 발생할 수 있습니다.

▶️ 해결 방법

Kserve Inference Service를 인증 없이 퍼블릭 API로 노출하려면, 아래와 같이 이미 존재하는 Istio EnvoyFilter 리소스를 수정해주세요.

authn-filter 수정 예시
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
annotations:
meta.helm.sh/release-name: <your-auth-release>
meta.helm.sh/release-namespace: auth
generation: 1
labels:
app.kubernetes.io/managed-by: Helm
name: authn-filter
namespace: istio-system
spec:
configPatches:
# [추가] 인증 우회를 위한 특정 서빙 API 엔드포인트 설정
- applyTo: VIRTUAL_HOST
match:
routeConfiguration:
vhost:
name: <your-inference-service-domain>:80 # 예: lb-forecast.example.com:80
patch:
operation: MERGE
value:
typed_per_filter_config:
envoy.filters.http.ext_authz:
'@type': >-
type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
disabled: true
# 기존 인증 필터 설정 (변경 없음)
- applyTo: HTTP_FILTER
match:
context: GATEWAY
listener:
filterChain:
filter:
name: envoy.http_connection_manager
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.ext_authz
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
http_service:
authorization_request:
allowed_headers:
patterns:
- exact: authorization
- exact: cookie
- exact: x-auth-token
authorization_response:
allowed_upstream_headers:
patterns:
- exact: kubeflow-userid
server_uri:
cluster: outbound|8080||authservice.istio-system.svc.cluster.local
timeout: 10s
uri: http://authservice.istio-system.svc.cluster.local
workloadSelector:
labels:
istio: ingressgateway

설정 후 Istio IngressGateway에 정상 반영되었는지 확인하고, 필요한 경우 해당 파드를 재시작하여 적용 상태를 확인하세요.