func icon indicating copy to clipboard operation
func copied to clipboard

Func Deploy issue with local kind registry

Open matzew opened this issue 1 year ago • 8 comments

Using the local kind registry from kn quickstart, I am getting a little issue.

Running the first deploy is good:

func deploy --registry localhost:5001
Building function image
Still building
🙌 Function built: localhost:5001/s3-logger:latest
Pushing function image to the registry "localhost:5001" using the "" user credentials
⬆️  Deploying function to the cluster
🎯 Creating Triggers on the cluster
✅ Function deployed in namespace "default" and exposed at URL: 
   http://s3-logger.default.127.0.0.1.sslip.io

Now, running it for a second time (and yes, no code changes), I am getting an error:

➜  s3-logger func deploy --registry localhost:5001
function up-to-date. Force rebuild with --build
Pushing function image to the registry "localhost:5001" using the "" user credentials
Error: Error response from daemon: failed to find image localhost:5001/s3-logger@sha256:82e961f6b4868a296547f477cec305af1048c4e9785bdc23e71088612675c42c: localhost:5001/s3-logger@sha256:82e961f6b4868a296547f477cec305af1048c4e9785bdc23e71088612675c42c: No such image

there is a work-around, by forcing the rebuild to happen, using the --build argument:

➜  s3-logger func deploy --build --registry localhost:5001
Building function image
Still building
🙌 Function built: localhost:5001/s3-logger:latest
Pushing function image to the registry "localhost:5001" using the "" user credentials
⬆️  Deploying function to the cluster
🎯 Creating Triggers on the cluster
✅ Function updated in namespace "default" and exposed at URL: 

NOTE: I am running w/ podman - not the docker CLI

matzew avatar Jun 18 '24 09:06 matzew

Did you use latest release or main @matzew ?

matejvasek avatar Jun 18 '24 12:06 matejvasek

btw another workaround could be flag -u=0.

matejvasek avatar Jun 18 '24 12:06 matejvasek

I used 0.41 version.

btw another workaround could be flag -u=0

is there any doc for that?

matzew avatar Jun 18 '24 13:06 matzew

-u=0 skips push

matejvasek avatar Jun 18 '24 13:06 matejvasek

After finding this thread, I tried to use -u=0, but I got the following error:

Error: deploy error. knative deployer failed to deploy the Knative Service: admission webhook "validation.webhook.serving.knative.dev" denied the request: validation failed: missing field(s): spec.template.spec.containers[0].image

@matejvasek Any idea of what it could be?

oEscal avatar Sep 15 '24 01:09 oEscal

@oEscal Does everything seem OK in the coredns pod's logs? I was getting the same error while coredns pod was full of with ERROR messages related to i/o timeouts. Restarting coredns pod via deleting it fixed my problem.

Besides that I also modified the nameserver value in /etc/resolv.conf of the minikube container with the value in my Macosx /etc/resolv.conf

devopscope avatar Sep 25 '24 21:09 devopscope

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Dec 25 '24 01:12 github-actions[bot]

This issue was automtatically closed by the bot, but I think we should confirm with the latest func and Knative.

lkingland avatar Feb 28 '25 02:02 lkingland

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar May 31 '25 01:05 github-actions[bot]