Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to test it in minikube #48

Closed
ctatineni opened this issue Apr 19, 2018 · 16 comments
Closed

Not able to test it in minikube #48

ctatineni opened this issue Apr 19, 2018 · 16 comments

Comments

@ctatineni
Copy link

followed all the steps, Tried installing and i got the below yaml wen executed "glooctl upstream get default-petstore-8080 -o yaml"

metadata:
annotations:
generated_by: kubernetes-upstream-discovery
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"sevice":"petstore"},"name":"petstore","namespace":"default"},"spec":{"ports":[{"port":8080,"protocol":"TCP"}],"selector":{"app":"petstore"}}}
namespace: gloo-system
resource_version: "950"
name: default-petstore-8080
spec:
service_name: petstore
service_namespace: default
service_port: 8080
status:
state: Accepted
type: kubernetes

@yuval-k
Copy link
Member

yuval-k commented Apr 19, 2018

The status Accepted indicates that gloo processed this upstream and that there are no errors. can you expand a bit more on what you are trying to do?

If possible please state what action did you try to do, what did you expect to happen, and what actually happened.

Thanks!

@ctatineni
Copy link
Author

Thanks for the reply, i think it took some time to list the routes, now i followed the steps listed in the getting started guide , i am not getting response when i try to test
curl ${GATEWAY_URL}/petstore/list
operation timedout

@yuval-k
Copy link
Member

yuval-k commented Apr 20, 2018

can you please paste the output of the following commands?
glooctl upstream get -o yaml
glooctl virtualhost get -o yaml
echo $GATEWAY_URL
When pasting, please use github's insert code feature (basically place it in a ``` block), so the formating is not lost :)

@ctatineni
Copy link
Author

'''+--------------------------+------------+----------+----------+
| NAME | TYPE | STATUS | FUNCTION |
+--------------------------+------------+----------+----------+
| default-petstore-8080 | kubernetes | Accepted | |
| gloo-system-gloo-8081 | kubernetes | Accepted | |
| gloo-system-ingress-8080 | kubernetes | Accepted | |
| gloo-system-ingress-8443 | kubernetes | Accepted | |
+--------------------------+------------+----------+----------+'''

@ctatineni
Copy link
Author

i deleted petstore app and try to install again and this time i am not seeing any functions listed

@ilackarms
Copy link
Member

@ctatineni can you run the following command:

export INGRESS_ADMIN=$(kubectl get po -l gloo=ingress -n gloo-system -o 'jsonpath={.items[0].status.hostIP}'):$(kubectl get svc ingress -n gloo-system -o 'jsonpath={.spec.ports[?(@.name=="admin")].nodePort}')

curl $INGRESS_ADMIN/config_dump

and paste the output here? please use triple backtics like @yuval-k suggested:

```
text goes here
```

also, try running kubectl apply -f https://raw.githubusercontent.com/solo-io/gloo/master/install/kube/install.yaml

the install from our docs is a little out of date

@ctatineni
Copy link
Author

new yaml file solved the issue of discovery, i am getting timeout for config dump
curl: (7) Failed to connect to 10.0.2.15 port 32158: Operation timed out

@ctatineni
Copy link
Author

---
functions:
- name: addPet
  spec:
    body: '{"id": {{ default(id, "") }},"name": "{{ default(name, "")}}","tag": "{{
      default(tag, "")}}"}'
    headers:
      :method: POST
      Content-Type: application/json
    passthrough_body: false
    path: /api/pets
- name: deletePet
  spec:
    body: ""
    headers:
      :method: DELETE
    passthrough_body: false
    path: /api/pets/{{id}}
- name: findPetById
  spec:
    body: ""
    headers:
      :method: GET
    passthrough_body: false
    path: /api/pets/{{id}}
- name: findPets
  spec:
    body: ""
    headers:
      :method: GET
    passthrough_body: false
    path: /api/pets?tags={{tags}}&limit={{limit}}
metadata:
  annotations:
    generated_by: kubernetes-upstream-discovery
    gloo.solo.io/swagger_url: http://petstore.default.svc.cluster.local:8080/swagger.json
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"sevice":"petstore"},"name":"petstore","namespace":"default"},"spec":{"ports":[{"port":8080,"protocol":"TCP"}],"selector":{"app":"petstore"}}}
  namespace: gloo-system
  resource_version: "706"
name: default-petstore-8080
service_info:
  type: REST
spec:
  service_name: petstore
  service_namespace: default
  service_port: 8080
status:
  state: Accepted
type: kubernetes

---
metadata:
  annotations:
    generated_by: kubernetes-upstream-discovery
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"gloo":"control-plane","release":"0.2.0"},"name":"control-plane","namespace":"gloo-system"},"spec":{"ports":[{"name":"http","port":8081,"protocol":"TCP"}],"selector":{"gloo":"control-plane","release":"0.2.0"}}}
  namespace: gloo-system
  resource_version: "612"
name: gloo-system-control-plane-8081
spec:
  service_name: control-plane
  service_namespace: gloo-system
  service_port: 8081
status:
  state: Accepted
type: kubernetes

---
metadata:
  annotations:
    generated_by: kubernetes-upstream-discovery
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"gloo":"ingress","release":"0.2.0"},"name":"ingress","namespace":"gloo-system"},"spec":{"ports":[{"name":"http","port":8080,"protocol":"TCP"},{"name":"https","port":8443,"protocol":"TCP"},{"name":"admin","port":19000,"protocol":"TCP"}],"selector":{"gloo":"ingress","release":"0.2.0"},"type":"LoadBalancer"}}
  namespace: gloo-system
  resource_version: "617"
name: gloo-system-ingress-19000
spec:
  service_name: ingress
  service_namespace: gloo-system
  service_port: 19000
status:
  state: Accepted
type: kubernetes

---
metadata:
  annotations:
    generated_by: kubernetes-upstream-discovery
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"gloo":"ingress","release":"0.2.0"},"name":"ingress","namespace":"gloo-system"},"spec":{"ports":[{"name":"http","port":8080,"protocol":"TCP"},{"name":"https","port":8443,"protocol":"TCP"},{"name":"admin","port":19000,"protocol":"TCP"}],"selector":{"gloo":"ingress","release":"0.2.0"},"type":"LoadBalancer"}}
  namespace: gloo-system
  resource_version: "609"
name: gloo-system-ingress-8080
spec:
  service_name: ingress
  service_namespace: gloo-system
  service_port: 8080
status:
  state: Accepted
type: kubernetes

---
metadata:
  annotations:
    generated_by: kubernetes-upstream-discovery
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"gloo":"ingress","release":"0.2.0"},"name":"ingress","namespace":"gloo-system"},"spec":{"ports":[{"name":"http","port":8080,"protocol":"TCP"},{"name":"https","port":8443,"protocol":"TCP"},{"name":"admin","port":19000,"protocol":"TCP"}],"selector":{"gloo":"ingress","release":"0.2.0"},"type":"LoadBalancer"}}
  namespace: gloo-system
  resource_version: "610"
name: gloo-system-ingress-8443
spec:
  service_name: ingress
  service_namespace: gloo-system
  service_port: 8443
status:
  state: Accepted
type: kubernetes
glooctl virtualhost get -o yaml
---
metadata:
  namespace: gloo-system
  resource_version: "1255"
name: default
routes:
- prefix_rewrite: /api/pets
  request_matcher:
    path_exact: /petstore/list
  single_destination:
    upstream:
      name: default-petstore-8080
status:
  state: Accepted
echo $GATEWAY_URL
http://10.0.2.15:32078

@ilackarms
Copy link
Member

What operating system are you running ?

@ctatineni
Copy link
Author

i tried in OSX and Linux

@yuval-k
Copy link
Member

yuval-k commented Apr 20, 2018

from the information you sent, everything seems to be in order with gloo (all resources have status Accepted), we suspect that the issue might be reaching to minikube .

what command did you use to start minikube?
can you confirm that minikube ip returns the gateway ip (in your example 10.0.2.15)?
if not, can you please try running using the minikube ip to access gloo?
i.e. in your case: http://$(minikube ip):32078

@yuval-k
Copy link
Member

yuval-k commented Apr 20, 2018

btw - if you are using the virtualbox driver for minikube the gateway IP is usually 192.168.99.100; so I would also try that: http://192.168.99.100:32078

@ctatineni
Copy link
Author

with minikube ip it worked, what would be the ip i should use if i deploy it in a remote Kubernetes cluster like in GCP

@ilackarms
Copy link
Member

@ctatineni Gloo works (just tested) on GCP, you'll just need to take an extra step to enable creating RBAC roles on your cluster:

kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole cluster-admin --user $(gcloud config get-value account)

as documented here: https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control

@ilackarms
Copy link
Member

@ctatineni can i go ahead and close this?

i'm going to update our docs to use minikube ip although i'm still uncertain why the original command failed

@ilackarms
Copy link
Member

@ctatineni docs have been updated to use minikube ip. closing this for now

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

No branches or pull requests

3 participants