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

Installing Camel-K operator on Docker for Desktop with Kubernetes cluster enabled #1902

Closed
doru1004 opened this issue Jan 12, 2021 · 2 comments
Labels
kind/question Further information is requested

Comments

@doru1004
Copy link
Contributor

Docker for Desktop allows the creation of a Kubernetes cluster.

I am trying to get kamel run to work in this setting but I'm hitting some blockers.

First step seems to be the need to create a registry using this command:

docker run -d -p 5000:5000 --restart=always --name registry registry:2

There are suggestions out there to use the actual docker.io registry but that is impractical because it requires the passing of the login credentials on the command line which is something that I would like to avoid.

Using the above created registry is desired and should work.

I install the camel-K operator like this:

kamel install --registry localhost:5000 --registry-insecure --force

The operator reaches running phase:

camel-k-operator-57bbcbd6dc-rrz6b   1/1     Running   0          3m3s

I then try to actually run one of the sample examples:

kamel run examples/Sample.java

This leads to this:

> kubectl get integration
sample      Building Kit   kit-bvusmmgm83jf9ujgr5fg

But after a while the kit building fails:

{"level":"info","ts":1610468378.0880353,"logger":"camel-k.controller.integrationkit","msg":"Reconciling IntegrationKit","request-namespace":"default","request-name":"kit-bvusmmgm83jf9ujgr5fg"}

{"level":"info","ts":1610468378.0881057,"logger":"camel-k.controller.build","msg":"Invoking action error-recovery","request-namespace":"default","request-name":"kit-bvusmmgm83jf9ujgr5fg","api-version":"camel.apache.org/v1","kind":"Build","ns":"default","name":"kit-bvusmmgm83jf9ujgr5fg"}

I suspect it is a registry access problem but I'm not sure. Any ideas how to get this to work?

@astefanutti
Copy link
Member

astefanutti commented Jan 25, 2021

I suspect the --registry localhost:5000 option isn't right. For a Kubernetes pod, localhost is used for internal container-to-container communication, between the pod's containers. So even if that's a single-node cluster, localhost won't resolve to the node host, but rather be different for each pod.

Taking as an example Minikube, a Service exposes the registry pod, and that Service ClusterIP is used to reach the registry from within the Camel K builder.

@astefanutti astefanutti added the kind/question Further information is requested label Jan 25, 2021
@astefanutti
Copy link
Member

I think it's been answered. Feel free to re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants