kube-ops-view icon indicating copy to clipboard operation
kube-ops-view copied to clipboard

Can't access kube-ops-view via kubectl proxy

Open holms opened this issue 5 years ago • 3 comments

Your documentation is completely not clear to me: https://kubernetes-operational-view.readthedocs.io/en/latest/getting-started.html

Started kubeproxy

redirected my browser to here: http://localhost:8001/api/v1/proxy/namespaces/default/services/kube-ops-view/

And I see this response:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {
    
  },
  "status": "Failure",
  "message": "the server could not find the requested resource",
  "reason": "NotFound",
  "details": {
    
  },
  "code": 404
}

I've installed kube-ops-view from helm chart via terraform:

resource "helm_release" "kube_ops_view" {
  name  = "kube-ops-view"
  chart = "stable/kube-ops-view"
}

And there's service available:

holms@debian ~/D/c/s/b/t/s/post-infra> kubectl get services
NAME            TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE
kube-ops-view   ClusterIP   10.245.84.84   <none>        80/TCP    24m

holms avatar Jul 30 '20 23:07 holms

You can use this url to access kube-ops

http://127.0.0.1:8001/api/v1/namespaces/kube-ops/services/http:my-release-kube-ops-view:/proxy

adjust the namespace to your setup

tbox1911 avatar Aug 11 '20 14:08 tbox1911

I have the same issue.

➜ helm install stable/kube-ops-view --generate-name
NAME: kube-ops-view-1597721335
LAST DEPLOYED: Mon Aug 17 20:29:00 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To access the Kubernetes Operational View UI:

1. First start the kubectl proxy:

   kubectl proxy

2. Now open the following URL in your browser:

   http://localhost:8001/api/v1/proxy/namespaces/default/services/kube-ops-view-1597721335/

So the URL above didn't work

and

http://127.0.0.1:8001/api/v1/namespaces/default/services/http:my-release-kube-ops-view:/proxy

However, if I changed the URL to

http://127.0.0.1:8001/api/v1/namespaces/default/services/http:kube-ops-view-1597721335:/proxy/

I started to get an HTML page, but unfortunately, it's just blank. Any ideas?

image

➜ k get services   
NAME                       TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
heapster                   ClusterIP   172.20.74.38   <none>        8082/TCP   32d
kube-ops-view-1597721335   ClusterIP   172.20.80.88   <none>        80/TCP     3m9s
kubernetes                 ClusterIP   172.20.0.1     <none>        443/TCP    32d
(⎈ |arn:aws:eks:us-east-2:xxx:cluster/xxx-dev-eks:default)
infrastructure on  develop via 🐍 system 

➜ k get pods    
NAME                                  READY   STATUS      RESTARTS   AGE
app-slack-notification-sqwq8          0/1     Completed   0          9d
heapster-1594948125-f895c9968-pmpbg   2/2     Running     0          31d
kube-ops-view-6fcb5dd9df-gtwnl        1/1     Running     0          7m31s
(⎈ |arn:aws:eks:us-east-2:xxx:cluster/xxx-dev-eks:default)

infrastructure on  develop via 🐍 system 
➜ k get deployments
NAME                  READY   UP-TO-DATE   AVAILABLE   AGE
heapster-1594948125   1/1     1            1           32d
kube-ops-view         1/1     1            1           7m35s
(⎈ |arn:aws:eks:us-east-2:xxx:cluster/xxx-dev-eks:default)

Everything is deployed into the default namespace, no errors in JS / networking console in the browser.

golance-mightydevops avatar Aug 18 '20 03:08 golance-mightydevops

Ok so this is how you can solve this

helm install --set rbac.create=true kube-ops-view stable/kube-ops-view
xdg-open http://127.0.0.1:8001/api/v1/namespaces/default/services/http:kube-ops-view:/proxy/

after that the service is working

golance-mightydevops avatar Aug 18 '20 04:08 golance-mightydevops