What better way to learn a technology than to create an app with it? The theory all makes sense when you actually put it into practice. To get familiar with Kubernetes basics, we will create a minimalistic application with an emphasis on learning Kubernetes. The outcomes of this project are:
- Better understanding and familiarity with Kubernetes basic concepts:
- Networking: Ingress & Service
- ConfigMaps & Secrets
- StatefulSets & VolumeClaims
- kubectl & minikube
- Learning a Rust framework along the way
This is a very basic app that stores k8 notes with useful information to memorize about Kubernetes!
To build the application, we will use the following tech stack:
- Kubernetes - Obviously
- Docker & DockerHub - For our container images
- Nginx - For our web server and our ingress
- Actix - A Rust framework and the Rust MongoDB driver
- Git - For version control
- MongoDB - For our database
- Optional: WSL, Linux subsystem for Windows
- Create ConfigMap and Secret
- Create DockerHub repo
- Build Rust app with Cargo
- Make custom image for the app
- Push to DockerHub
- Deploy to k8 and test endpoint with minikube service
- Deploy MongoDB with persistent volume
- Test Actix app integration with MongoDB
- Create ingress for Actix app and test
- Make custom image for Nginx web server
- Push to DockerHub
- Deploy to k8 and test with minikube service
- Add web service to ingress
- Test the entire application