Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Commit 3900f23

Browse files
author
ohotnikov.ivan
committed
fix(console): proxy API requests through BFF instead of direct K8s access
Change nginx configuration to proxy /api and /apis requests to localhost:64231 (BFF) instead of directly to kubernetes.default.svc:443. BFF handles ServiceAccount authentication and provides authorized access to K8s API. Signed-off-by: ohotnikov.ivan <[email protected]>
1 parent 07b0192 commit 3900f23

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎Containerfile‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ server {
4141
root /usr/share/nginx/html;
4242
index index.html;
4343

44-
# Kubernetes API proxy for both core and aggregated groups.
45-
# Chunked-encoding watches require proxy_buffering off and a long timeout.
44+
# Kubernetes API proxy through BFF for authentication
45+
# BFF container handles ServiceAccount auth and proxies to k8s.default.svc
4646
location /apis {
4747
proxy_http_version 1.1;
4848
proxy_buffering off;
4949
proxy_set_header Upgrade $http_upgrade;
5050
proxy_set_header Connection $connection_upgrade;
5151
proxy_set_header X-Forwarded-Proto $scheme;
52-
proxy_set_header Host kubernetes.default.svc;
52+
proxy_set_header Host $host;
5353
proxy_read_timeout 86400s;
5454
proxy_send_timeout 86400s;
55-
proxy_pass https://kubernetes.default.svc:443;
55+
proxy_pass http://localhost:64231;
5656
}
5757

5858
location /api {
@@ -61,10 +61,10 @@ server {
6161
proxy_set_header Upgrade $http_upgrade;
6262
proxy_set_header Connection $connection_upgrade;
6363
proxy_set_header X-Forwarded-Proto $scheme;
64-
proxy_set_header Host kubernetes.default.svc;
64+
proxy_set_header Host $host;
6565
proxy_read_timeout 86400s;
6666
proxy_send_timeout 86400s;
67-
proxy_pass https://kubernetes.default.svc:443;
67+
proxy_pass http://localhost:64231;
6868
}
6969

7070
# SPA fallback: serve index.html for all frontend routes.

0 commit comments

Comments
 (0)