-
Notifications
You must be signed in to change notification settings - Fork 349
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
Error creating Integration with Kaniko build strategy and Docker Desktop #4158
Comments
Thanks for reporting. Yes, it looks like something specific to Kaniko. Probably this behavior is something we should eventually document as requested in #3336 |
Looks like we're running into the same issue on AKS after upgrading to kubernetes version 1.25. We're running camel k in version 1.10.4. Upgrading the operator to 1.12.0 didn't solve the problem. |
Have you looked at the workaround provided in the previous comment? |
@squakez not sure how I could apply the mentioned problem resolution on an Azure Kubernetes Service. We were able to solve the issue by using |
Okey, it seems probably something related to Kaniko and the new version of Kubernetes. Now sure how to workaround. I have seen there is a new version of Kaniko (1.9.2), but not sure if that is going to fix this kind of problems. I suggest you try to execute a sample Kaniko build in the same cluster to verify if the behavior is the same. |
This issue has been automatically marked as stale due to 90 days of inactivity. |
Actual behaviour
When creating an Integration with kaniko build strategy and Docker Desktop, kaniko container ends with:
kaniko should only be run inside of a container, run with the --force flag if you are sure you want to continue
Expected behaviour
camel-k-kit builder pod should have STATUS Completed
Steps to reproduce
First, have a docker desktop installation running on linux machine. Installed as described here
Note: before installing camel-k on cluster, create a docker-registry secret with the downloaded json key
Wait for IntegrationPlatform to be Ready
$ kubectl get IntegrationPlatform
Edit spec traits to include registry secret
$ kubectl edit IntegrationPlatform camel-k
add traits spec:
Apply integration
$ kubectl apply -f integration.yaml
Wait for camel-k-kit builder container to finish building
get builder pod name
$ kubectl get pods
get pod logs
$ kubectl logs camel-k-kit-cgec2trs3c7ebgv37nd0-builder -f -c kaniko
Output should be:
kaniko should only be run inside of a container, run with the --force flag if you are sure you want to continue
Problem Resolution
Changing docker context to use Docker Engine resolved the problem
$ docker context use default
Then recreate Integration.
I know this is a very specific issue. I struggled some time to discover that the root of the problem was the docker desktop context, but it's good for the sake of documentation, in case someone bumps with a similar error.
I don't know if this is a kaniko specific error, or relates to camel-k build strategy configuration.
The text was updated successfully, but these errors were encountered: