Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.74 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.74 KB

cool-kid-kloud - simple / basic voting up

Purpose: for my kodekloud learning journey on kubernetes

Base on kodekloud kubernetes for absolute beginner course URL: https://kodekloud.com/courses/kubernetes-for-the-absolute-beginners-hands-on/

How to use?

  1. Install minikube in your laptop, preferably via Oracle VM
  2. Install Visual Studio Code
  3. Git clone this repository
  4. Installation:
    • kubectl create -f voting-app-pod.yaml
    • kubectl create -f voting-service.yaml
    • kubectl create -f redis-pod.yaml
    • kubectl create -f redis-service.yaml
    • kubectl create -f result-app-pod.yaml
    • kubectl create -f result-service.yaml
    • kubectl create -f postgres-pod.yaml
    • kubectl create -f postgres-service.yaml
    • kubectl create -f worker-pod.yaml

How to verify that all pods and service are created?

Execute: kubectl get pods,svc. Alternatively, execute: kubectl get all

The result should display similar to below. All pods must be in running status and all services are correctly defined with type as below.

image

How to access the application

As this is installed in minikube, you can verify the url for each voting and result app. This can be done by executing: minikube service voting-service --url and minikube service resutl-service --url.
The output should be similar to below:

image

-- Note that IP address is specific to my laptop installation --

Important

Note that when you cast the vote in the voting-app url, the result-app url should reflect the vote that you have made.