Closed AlexRex closed 6 years ago
most likely the deployment of a specific function uses the old function API group.
should be a small fix
no,I read to fast sorry. We will check it out.
hi @AlexRex, it is weird but I am not able to reproduce it with the latest kubeless and serverless-kubeless:
▶ sls deploy -v
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Deploying function ping...
Serverless: Pods status: {"waiting":{"reason":"PodInitializing"}}
Serverless: Function ping successfully deployed
Serverless: Deployed Ingress rule pingpong
▶ sls deploy -v
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Pods status: {"running":{"startedAt":"2018-05-30T13:08:59Z"}},{"waiting":{"reason":"PodInitializing"}}
Serverless: Function ping successfully deployed
Serverless: Updated Ingress rule pingpong
▶ sls deploy -f ping
Serverless: Packaging function: ping...
executing this?
Serverless: Excluding development dependencies...
Serverless: Redeploying ping...
Serverless: Function ping successfully deployed
which versions are you running? where are you running kubernetes?
@andresmgot
I am using: serverless-kubeless version 0.4.2 kubernetes version 1.8.0 on Minikube (maybe this is the cause) serverless version 1.27.3 Kubeless version: v1.0.0-alpha.4
that's seems correct but in any case, if your minikube is a development environment, could you try to upgrade/delete your current cluster?
I tried out twice and same effect. Not sure what else I can try. I mean, is not really a blocker as whenever I want to redeploy I can change a file and do it, but only happens if I change a handler file, not the serverless.yml file, for example.
I finally was able to reproduce it forcing the version 1.8.0. Apparently it's a bug there but I am not able to find any reference to that. I recommend you to upgrade to 1.9 but if for some reason you need to run Kubernetes 1.8 you can still create it as:
minikube start --vm-driver=hyperkit --bootstrapper=kubeadm --kubernetes-version=v1.8.1
Note that you need hyperkit
for that. Sorry for the inconveniences.
Thanks for looking at it! I'm in fact using 1.8.0, using hyperkit. I will move to 1.8.1 or try with 1.9.
When deploying a function, the first time I can deploy it without any issues, but if I try to redeploy it, either with the command
sls deploy
or only deploying the function withsls deploy -f ping
, I got an error coming from kubernetes:The first time after deploying everything it works perfect, but afterwards I am getting this error.
This is my
serverless.yml
file:And this is the handler:
I noticed that if I change the handler file and try to redeploy, then I don't get any error, even if I only change one space.