Skip to content

Latest commit

 

History

History
87 lines (53 loc) · 1.59 KB

README.md

File metadata and controls

87 lines (53 loc) · 1.59 KB

Predict-buston-housing-price

The project will deploy and operationalize machine learning model built to predict the price of houses in Buston

CircleCI

Deploy with Docker

Deploy with Kubernetes

Create a Deployment and Service of the application.

kubectl create -f k8s-deployment-template.yml

The service is expose via NodePort, therefore you want to get the node IP of the cluster to test the deployment.

kubectl get node -o wide

Copy the public IP of a node and use it for the test as shown below.

To test provide the Port number 31000 and NodeIP to the make-prediction script

export HOSTP=HOST_IP
export PORT=31000

or

HOST=HOST_IP
PORT=31000
./make_prediction.sh $PORT $HOST

If all goes well, you see the prediction by the model.

View Logs

To view logs by the application

get the Pod

kubectl get pod

Replace POD_NAME in the command below with the name of the Pod created.

kubectl logs POD_NAME --container boston-house-model

If you are connected to the cluster, you can also test using the ClusterIP

curl ClusterIP:8082

Clean up

kubectl delete deployment boston-house-deployment
kubectl delete service boston-house-service

Note: There is also a similar deployment and service template that uses a Load Balancer instead of NodePort lb-deployment.yml

kubectl create -f lb-deployment.yml