Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Testing the application after applying the .yaml files #44

Open
MatthewTafazoli opened this issue Dec 9, 2021 · 3 comments
Open

Testing the application after applying the .yaml files #44

MatthewTafazoli opened this issue Dec 9, 2021 · 3 comments

Comments

@MatthewTafazoli
Copy link

Hello,

Thank you very much for your tutorial, it has really helped my understanding of models runs on Kubernetes.

I am fairly new to Kubernetes myself, so I apologize ahead of time if this is a very obvious question.

Using Minikube I have succesfully applied all the .yaml files, and have confirmed the pods are running without issue.
deployments
deployments on command line

And the Minikube Service List command seems to show everything is working alright

service list

This part may show my total lack of understanding, but when I try running the application to see the result:

python identifier.py unkown.jpg

NoOutput

everything just waits around and nothing seems to be output.

I am sure I am likely doing something wrong, but after reading through the documentation I am not sure what to do to receive the face recognition output.

Thank You and Best Regards,

Matthew

@Skarlso
Copy link
Owner

Skarlso commented Dec 9, 2021

Hi Matthew!

Gonna reply soonish! For start, you have to forward, out the frontend using kube proxy and the receiver too. And then use curl to post something to it. I'll whip something up in a second.

@MatthewTafazoli
Copy link
Author

Hello Skarlso,

Thank you for your quick response! I'm sorry but I don't quite understand what you mean by forwarding out of the frontend and receiver using kube proxy. Is there any way to demonstrate what you mean?

Thanks again and Much Appreciated!

Matthew

@Skarlso
Copy link
Owner

Skarlso commented Dec 10, 2021

Hi, sorry, busy day yesterday.

Okay, so what's happening here. The python backend talks to the image processor via GRPC. So whatever happens, that's how it's supposed to its thing. The whole thing is working together, so you can't just signal a single component of them or run them locally so to say.

There are two "entrypoints" to this whole thing. :) The first one is the receiver. Which receives requests from the outside world on images to process. And then there is the frontend which you can look at to see what has been processed successfuly.

I outline this whole thing here: https://skarlso.github.io/2018/03/15/kubernetes-distributed-application/

What am I saying when I'm saying use kubectl proxy? I didn't create services with certificates and letsencrypt and anything like that which forwards and opens things on certain ports for you to access from outside the cluster. So what you need to do is make them available with a thing called port-forward.

Once you port-forward one of the services like receiver, you can access it and send data to it.

For example:

kubeclt port-forward receiver-pod-name 8000:8000

Then you can do a curl:

curl -d '{"path":"/unknown_images/unknown0001.jpg"}' http://127.0.0.1:8000/image/post

You have to have the right images at the right location for that to work of course. There is a script which should bootstrap the whole environment on Kind. And you can set up folders with images and use extra mounts outlined in the kind cluster config file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants