-
Notifications
You must be signed in to change notification settings - Fork 243
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
How to create a valid URL when using kubernetes in the backend? #3463
Comments
I tried below steps to create a URL on k8s but it didn't work for me: $ minikube ip
192.168.39.95
$ odo url create --host `minikube ip`.nip.io
I0701 11:31:31.125449 9688 cert_rotation.go:137] Starting client certificate rotation controller
✓ URL node-todo-8080 created for component: node-todo
To apply the URL configuration changes, please use `odo push`
$ odo push
I0701 11:31:51.092827 9760 cert_rotation.go:137] Starting client certificate rotation controller
Validation
✓ Validating the devfile [16684ns]
Creating Kubernetes resources for component node-todo
✓ Waiting for component to start [2ms]
Applying URL changes
✓ URL node-todo-8080: http://node-todo-8080.192.168.39.95.nip.io created
Syncing to component node-todo
✓ Checking file changes for pushing [816133ns]
✓ No file changes detected, skipping build. Use the '-f' flag to force the build.
Pushing devfile component node-todo
✓ Changes successfully pushed to component But I can't access the app on http://node-todo-8080.192.168.39.95.nip.io. What am I doing wrong? 🤔 |
/area url ping @mik-dass @yangcao77 |
can you check how your Ingress looks? |
$ kubectl get ing
NAME CLASS HOSTS ADDRESS PORTS AGE
node-todo-8080 <none> node-todo-8080.192.168.39.95.nip.io 80 4h11m And here's the yaml apiVersion: extensions/v1beta1
kind: Ingress
metadata:
creationTimestamp: "2020-07-01T06:01:51Z"
generation: 1
labels:
app: ""
app.kubernetes.io/instance: node-todo
app.kubernetes.io/managed-by: odo
app.kubernetes.io/managed-by-version: v1.2.3
app.kubernetes.io/part-of: ""
odo.openshift.io/url-name: node-todo-8080
managedFields:
- apiVersion: extensions/v1beta1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:labels:
.: {}
f:app: {}
f:app.kubernetes.io/instance: {}
f:app.kubernetes.io/managed-by: {}
f:app.kubernetes.io/managed-by-version: {}
f:app.kubernetes.io/part-of: {}
f:odo.openshift.io/url-name: {}
f:ownerReferences:
.: {}
k:{"uid":"fb19e14c-98f7-4dc9-9918-8bdfa009bdbd"}:
.: {}
f:apiVersion: {}
f:kind: {}
f:name: {}
f:uid: {}
f:spec:
f:rules: {}
manager: odo
operation: Update
time: "2020-07-01T06:01:51Z"
name: node-todo-8080
namespace: default
ownerReferences:
- apiVersion: apps/v1
kind: Deployment
name: node-todo
uid: fb19e14c-98f7-4dc9-9918-8bdfa009bdbd
resourceVersion: "63873"
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/node-todo-8080
uid: 646c6bfd-5f93-4bef-8b3d-1ab132a6e1aa
spec:
rules:
- host: node-todo-8080.192.168.39.95.nip.io
http:
paths:
- backend:
serviceName: node-todo
servicePort: 8080
path: /
pathType: ImplementationSpecific
status:
loadBalancer: {}
|
What type of Ingress controller are you using? |
I don't know what you're asking about. I'm using minikube. Haven't touched anything since doing $ minikube version
minikube version: v1.10.1
commit: 63ab801ac27e5742ae442ce36dff7877dcccb278 |
Why do we see |
@dharmit I have been trying to figure this out since a long time but have been unsuccessfully so far. |
that might be a problem ;-)
That is the port for the ingress controller, which is usually 80 or 443 in the case of https.
|
I see. One of the downsides of using OCP where Routes work OOTB. Enabling the ingres addon did the trick! URL loads fine. |
However, I still think that some kind of CLI docs are needed that a k8s user might find helpful. A separate small section indicating how it can be done for minikube along with this link that explains how to enable ingres addon. WDYT @mik-dass @kadel @yangcao77 ? |
Yes, this should be documented somewhere, but I'm not sure that the CLI help is a good place for this, odo documentation might be a better place |
co-related to this #3771 |
**What type of PR is this?** > Uncomment only one ` /kind` line, and delete the rest. > For example, `> /kind bug` would simply become: `/kind bug` /kind cleanup /kind documentation **What does does this PR do / why we need it**: Updates the `--help` in the following way: - Changes the `odo create --help` usage to a 1-sentence summary similar to every other command - Updates our documentation to remove any mention of crc for something more neutral (example.com) similar to kubectl / kubernetes documentation, for example: https://kubernetes.io/docs/concepts/services-networking/ingress/ **Which issue(s) this PR fixes**: Fixes redhat-developer#3463 **PR acceptance criteria**: - [X] Documentation - [X] I have read the [test guidelines](https://github.com/openshift/odo/blob/master/docs/dev/test-architecture.adoc) **How to test changes / Special notes to the reviewer**: `odo create --help` and `odo url create --help` Signed-off-by: Charlie Drage <charlie@charliedrage.com>
#3858 will close this issue! |
* init * Update the help usage for odo create and odo url create **What type of PR is this?** > Uncomment only one ` /kind` line, and delete the rest. > For example, `> /kind bug` would simply become: `/kind bug` /kind cleanup /kind documentation **What does does this PR do / why we need it**: Updates the `--help` in the following way: - Changes the `odo create --help` usage to a 1-sentence summary similar to every other command - Updates our documentation to remove any mention of crc for something more neutral (example.com) similar to kubectl / kubernetes documentation, for example: https://kubernetes.io/docs/concepts/services-networking/ingress/ **Which issue(s) this PR fixes**: Fixes #3463 **PR acceptance criteria**: - [X] Documentation - [X] I have read the [test guidelines](https://github.com/openshift/odo/blob/master/docs/dev/test-architecture.adoc) **How to test changes / Special notes to the reviewer**: `odo create --help` and `odo url create --help` Signed-off-by: Charlie Drage <charlie@charliedrage.com>
/kind documentation
What mistake did you find / what is missing in the documentation?
In the CLI documentation, I don't see a way to create a URL that assumes kubernetes/minikube as the backend.
What is the relevance of it?
It is relevant because that's the first source of documentation for odo CLI user and it contains only CRC related examples.
NOTE:
This issue is opened to add missing CLI documentation. The same problem may or may not be existent in the web based docs but that's not what this issue is referring to.
The text was updated successfully, but these errors were encountered: