kz
08/17/2021, 12:03 PMkubectl --proxy
- which is how we access internal-use webpages under our security model. I honestly wasn't sure if this should be a bug or a feature request. I submitted this ticket as a bug since it's affecting our ability to use the product. Please let me know if I can helpuser
08/17/2021, 12:10 PMuser
08/17/2021, 12:10 PMkz
08/17/2021, 12:15 PMFROM google/cloud-sdk:323.0.0
in our Dockerfile
and then deploy a proxy service in our docker-compose.yaml
# enable kubectl proxy
kube-dash:
build: .
working_dir: /our-ops-project
ports:
- "8001:8001"
volumes:
- local-gcp-data-volume:/root/.config
- local-kube-data-volume:/root/.kube
- .:/our-ops-project
entrypoint: ["kubectl", "proxy", "--address=0.0.0.0"]
volumes:
local-gcp-data-volume: {}
local-kube-data-volume: {}
user
08/17/2021, 12:16 PMkubectl proxy
command in the background and we then access web-based services by appending the proxy
verb to the k8s api url like so <http://localhost:8001/api/v1/namespaces/airbyte/services/airbyte-webapp-svc/proxy/>
user
08/17/2021, 12:25 PMuser
08/17/2021, 12:27 PMkubectl --port-forward
in the command line without any containersuser
08/17/2021, 12:28 PMproxy
flag starts a proxy server to the K8s control api instead of the airbyte webapp pod - https://kubernetes.io/docs/tasks/extend-kubernetes/http-proxy-access-api/#using-kubectl-to-start-a-proxy-serveruser
08/17/2021, 12:32 PMuser
08/17/2021, 12:33 PMkz
08/17/2021, 12:37 PM/proxy
that you append to the end of the URL that allows you to hit the underlying service. I believe this is a relative path issue. I can do View->Source and see that there is html being downloaded. For example the URL for the favicon shows up as href="/api/v1/namespaces/airbyte/services/airbyte-webapp-svc/proxy/favicon.ico"
, but the javascript for the application fails with 404 GET <http://localhost:8001/static/js/1.687a2971.chunk.js> net::ERR_ABORTED 404 (Not Found)
user
08/17/2021, 12:44 PM<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
user
08/17/2021, 12:55 PMCreates a proxy server or application-level gateway between localhost and the Kubernetes API server. It also allows serving static content over specified HTTP path.
Our webapp isn't static - there is an Nginx in there, so I'm guessing that's why this is failinguser
08/17/2021, 12:56 PMuser
08/17/2021, 1:00 PMuser
08/17/2021, 1:02 PMuser
08/17/2021, 1:06 PMport forward
?kz
08/17/2021, 1:08 PMuser
08/17/2021, 1:14 PMuser
08/17/2021, 1:16 PMuser
08/17/2021, 1:16 PMentrypoint: ["kubectl", "port-forward", "--address=0.0.0.0", "--namespace=airbyte", "svc/airbyte-webapp-svc", "8000:80"]
user
08/17/2021, 1:19 PMuser
08/17/2021, 1:19 PMkz
08/17/2021, 1:20 PMuser
08/17/2021, 1:22 PMuser
08/17/2021, 1:25 PM