Closed springCozyRock closed 5 months ago
update: I am so excited that my error message changed! I was so depressed (even cried yesterday) these days because of my noncommittal program and something else~
so what I've done is digging in the reference of gateway. I found that to access ui (http://localhost:31112/ui/) before, I followed a tutorial on the internet, and port Forwarding from 127.0.0.1:31112 -> 8080
, basically run --
kubectl port-forward svc/gateway -n openfaas 31112:8080 &
export OPENFAAS_URL=http://127.0.0.1:31112
echo $PASSWORD | faas-cli login --password-stdin
then I got the light, and tried faas-cli deploy -f ./cpu.yml --gateway=http://localhost:31112
the error message changed!!!!
beatles@xxxxxsMBP openfaas % faas-cli deploy -f ./cpu.yml --gateway=http://localhost:31112
Deploying: float-operation.
unauthorized access, run "faas-cli login" to setup authentication for this server
Function 'float-operation' failed to deploy with status code: 401
I suppose I almost succeed. Let me fix it, and I will close the issue.
very easy then!!
beatles@xxxxxsMBP openfaas % faas-cli login --username admin --password=681d0e42c1506c260eba6cc73ad61b3330276302 --gateway=http://localhost:31112
WARNING! Using --password is insecure, consider using: cat ~/faas_pass.txt | faas-cli login -u user --password-stdin
Calling the OpenFaaS server to validate the credentials...
credentials saved for admin http://localhost:31112
beatles@xxxxxxsMBP openfaas % faas-cli deploy -f ./cpu.yml --gateway=http://localhost:31112
Deploying: float-operation.
Deployed. 202 Accepted.
URL: http://localhost:31112/function/float-operation
cheers!!!
I was deploying my first python function with OpenFaas, but failed.
my environment: k3d + openFaas on Mac
What I've got --
I have checked stack overflow, and troubleshooting handbook, but still not work. Following are some information I got.
I supposed it might be a gateway problem, but I don't know how it actually works. I also have checked @alexellis 's tutorial video, I saw he used
-g https://openfaas.o6s.io
but I don't know what this string supposed to be in my case?