The following repo was designed to demonstrate kubernetes functionality.
Starting from minikube
and scaling into a "full-blown" cluster, follow the Scenario-#
dirs and their corresponding README.md
files.
- Scenario 1 - demo-app show native pod load balancing
- Scenario 2 - "ping pong" client and server external service calling an internal services
- Scenario 3 - "ping pong" ingress ping pong client and server external services which communicate with one another via the external service
kubectl
minikube
- recommended
jq
|-- README.md
|-- Scenario-1 # simple ingress example [ complete ]
| |-- README.md # scenario readme
| |-- deployment.yml # demo-app deployment spec
| |-- ingress.yml # demo-app ingress spec
| `-- service.yml # demo-app service spec
|-- Scenario-2 # bind 2 services without ingress
| |-- README.md # scenario readme [ complete ]
| |-- pong-server-deployment.yml # client deployment spec
| |-- pong-server-service.yml # client service spec
| |-- ping-server-deployment.yml # server deployment spec
| `-- ping-server-service.yml # server service spec
|-- Scenario-3 # bind 2 services with ingress [ incomplete ]
| |-- README.md # scenario readme
| |-- pong-server-deployment.yml # client deployment spec
| |-- pong-server-ingress.yml # client ingress spec
| |-- pong-server-service.yml # client service spec
| |-- ping-server-deployment.yml # server deployment spec
| |-- ping-server-ingress.yml # server ingress spec
| `-- ping-server-service.yml # server service spec
|-- app # demo-apps dir
| |-- client # client
| | |-- Dockerfile # client Dockerfile
| | |-- client.js # client node app
| | `-- package.json # client dependencies
| `-- server # server
| |-- Dockerfile # server Dockerfile
| `-- server.js # server node app
`-- static # static files
`-- demo-app-node-port.png
minikube start
- Add the result of the following command to your etc/hosts:
echo "
minikube ip
demo-app.example.com" kubectl deploy ./Scenario-1/deployment.yaml
kubectl deploy ./Scenario-1/service.yaml
minikube addons enable ingress
kubectl deploy ./Scenario-1/ingress.yaml
- Open your browser http://demo-app.example.com
- Install requirements
- Install
minikube
- Install
kubectl
- Start minikube
minikube start
- validate installation by running
minikube ip
which should return the ip address of the vm hosting minikube ... e.g:192.168.99.100
- Check
kubectl
is working againstminikube
- kubectl cluster-info which should yield:
kubectl cluster-info Kubernetes master is running at https://192.168.99.100:8443 To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Jump to the demo-app in Scenario-1
to continue. link