Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

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

Open
holms opened this issue Jul 30, 2020 · 3 comments
Open

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

holms opened this issue Jul 30, 2020 · 3 comments

Comments

@holms
Copy link

holms commented Jul 30, 2020

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 holms changed the title Can't access kube-ops-view Can't access kube-ops-view via kubectl proxy Jul 30, 2020
@tbox1911
Copy link

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

@golance-mightydevops
Copy link

golance-mightydevops commented Aug 18, 2020

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants