You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "anhpngt (via GitHub)" <gi...@apache.org> on 2023/07/10 15:08:31 UTC

[GitHub] [camel-k] anhpngt opened a new issue, #4556: `kamel run` in output mode still requires connecting to a k8s cluster

anhpngt opened a new issue, #4556:
URL: https://github.com/apache/camel-k/issues/4556

   While #3723 removes the need for an Camel K operator, `kamel run` in output mode (with `--output` option) still requires an actual Kubernetes cluster.
   
   Steps to reproduce:
   
   1. Have any integration:
     ```sh
     $ cat <<EOF >> helloworld.groovy
     from(timer:tick?period=3000)
       .setBody().constant(Hello world from Camel K)
       .to(log:info)
     EOF
     ```
   
   2. Do not connect to any k8s cluster
   
     ```sh
     $ kubectl get ns
     ...
     E0710 21:54:08.181180   78667 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
     The connection to the server localhost:8080 was refused - did you specify the right host or port?
     ```
   
   3. Use `kamel run` in output mode
   
     ```sh
     $ kamel run -o yaml helloworld.groovy
     Error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
     ```
   
   This is probably due to the instantiation of the k8s client even in output mode, such as here https://github.com/apache/camel-k/blob/da3ed49733b77a09671802343141611f759b4065/pkg/cmd/run.go#L295.
   
   I think it would be better if this output mode does not require any k8s cluster connection.
   Then, it'd be possible to generate resources in YAML `kubectl apply` in CI/CD.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] claudio4j commented on issue #4556: `kamel run` in output mode still requires connecting to a k8s cluster

Posted by "claudio4j (via GitHub)" <gi...@apache.org>.
claudio4j commented on issue #4556:
URL: https://github.com/apache/camel-k/issues/4556#issuecomment-1631603622

   There is a `~/.kube/config` in my system, once I rename it your reproducer works, which is I can't expose the integration with `-oyaml`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] anhpngt commented on issue #4556: `kamel run` in output mode still requires connecting to a k8s cluster

Posted by "anhpngt (via GitHub)" <gi...@apache.org>.
anhpngt commented on issue #4556:
URL: https://github.com/apache/camel-k/issues/4556#issuecomment-1630051968

   That seems weird? :thinking: here is the version I'm having
   
   ```sh
   $ kamel version
   Camel K Client 1.12.0
   
   $ echo $KUBECONFIG
   
   $ kamel run helloworld.groovy -oyaml
   Error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
   ```
   
   I also tried with `go run cmd/kamel/main.go run helloworld.groovy --output yaml` and had similar error


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] anhpngt commented on issue #4556: `kamel run` in output mode still requires connecting to a k8s cluster

Posted by "anhpngt (via GitHub)" <gi...@apache.org>.
anhpngt commented on issue #4556:
URL: https://github.com/apache/camel-k/issues/4556#issuecomment-1632228174

   ah that explains it, I think I should've used `--kube-config` in my reproducer to make it less confusing :+1: thank you for the confirmation


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez closed issue #4556: `kamel run` in output mode still requires connecting to a k8s cluster

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez closed issue #4556: `kamel run` in output mode still requires connecting to a k8s cluster
URL: https://github.com/apache/camel-k/issues/4556


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] claudio4j commented on issue #4556: `kamel run` in output mode still requires connecting to a k8s cluster

Posted by "claudio4j (via GitHub)" <gi...@apache.org>.
claudio4j commented on issue #4556:
URL: https://github.com/apache/camel-k/issues/4556#issuecomment-1629701170

   I used kamel 1.12 and I am not connected to the cluster, but the `kamel run integratio.java -oyaml`, just works.
   What version are you using ? 
   Do you have a KUBECONFIG environment variable defined ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org