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

Kamel run default service nodePort is invalid #3296

Closed
f39516046 opened this issue May 24, 2022 · 4 comments
Closed

Kamel run default service nodePort is invalid #3296

f39516046 opened this issue May 24, 2022 · 4 comments

Comments

@f39516046
Copy link

Here is the thing, my team use Kamel v1.8.2 , and we run a route by xxx.java . Then default kamel create a service for this route,but the nodePort is invalid .Detail to see the attchment.
image

the targePort placed by the string "http" , so it can not perform normally.

And now we have to use --trait service.enabled=false ,to disable the default service,then re-create a service manually.

please help to find whether this is an issue . Thanks.

@tadayosi
Copy link
Member

Hi,

targetPort can be string such as http when the pod has the port named http:
https://kubernetes.io/docs/concepts/services-networking/service/

So why is it considered invalid? Could it be a problem with the console you are using?

@f39516046
Copy link
Author

Hi,

targetPort can be string such as http when the pod has the port named http: https://kubernetes.io/docs/concepts/services-networking/service/

So why is it considered invalid? Could it be a problem with the console you are using?

ok,i get it. but also i have no idea about why kamel run default generate a service use targetPort http,but the PODs ports is none, there is no port named http. We only use the Platform-Http-Vertx component, anything works well(kit build successfully,and pods run well). The default service truely can not works well due to the targetPort http, there is no POD named it.

@tadayosi
Copy link
Member

tadayosi commented May 26, 2022

What are the status.conditions of your integration resource? If the app includes an http service then Camel K automatically exposes a containerPort with the name http on the deployment/pod. If Camel K thinks otherwise it won't expose a containerPort but update the integration status conditions like this:

$ kubectl get it <your-integration> -oyaml | yq e .status.conditions
[...]
- lastTransitionTime: "2022-05-26T04:01:58Z"
  lastUpdateTime: "2022-05-26T04:01:58Z"
  message: no http service required
  reason: ServiceNotAvailable
  status: "False"
  type: ServiceAvailable
[...]

@f39516046
Copy link
Author

What are the status.conditions of your integration resource? If the app includes an http service then Camel K automatically exposes a containerPort with the name http on the deployment/pod. If Camel K thinks otherwise it won't expose a containerPort but update the integration status conditions like this:

$ kubectl get it <your-integration> -oyaml | yq e .status.conditions
[...]
- lastTransitionTime: "2022-05-26T04:01:58Z"
  lastUpdateTime: "2022-05-26T04:01:58Z"
  message: no http service required
  reason: ServiceNotAvailable
  status: "False"
  type: ServiceAvailable
[...]

ok,thanks a lot

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

2 participants