Routes Available:
=> get /story
=> post /story body: { "text": "Store this thought" }
-
Download Minikube & kubectl
-
minikube start
-
kubectl apply -f story-pv.yaml
-
kubectl apply -f story-pvc.yaml
-
kubectl apply -f deployment.yaml
-
kubectl apply -f service.yaml
Now deployment and service are created, to expose it we need to give an additional command in minikube
minikube service story-service
Now, you can access the application! 😃
Note:
: The data stored through post route /story
will be persisted even when container crashes. Although it will be destroyed when pod is removed.