The purpose of this exercise is to deploy app.py application to Kubernetes.
We would like the solution to do the following:
- deploy app.py application to Kubernetes
- have kubernetes manifest for python web server and Redis
- follow best practices regarding security, high availability and observability
-
Make sure docker is installed on your machine command - docker --version Docker version 19.03.8, build afacb8b7f0
-
Make sure kubernetes is installed. command - kubectl version Client Version: version.Info{Major:"1", Minor:"20"
-
We need to build the docker image. docker build -t imagename .
-
docker image tag App:latest repo/appname:latest
-
docker login
-
docker push repo/Appname:latest
You have the image build and push to the docker repository.
##Next steps
-
kubectl create secret docker-registry regcred --docker-server= --docker-username= --docker-password= --docker-email=
-
kubectl create namespace assignment
-
kubectl apply -f app-deployment.yaml --namespace=assignment
-
kubectl apply -f app-service.yaml --namespace=assignment
-
kubectl apply -f redis-master-deployment.yaml --namespace=assignment
-
kubectl apply -f redis-master-service.yaml --namespace=assignment
-
kubectl apply -f redis-slave-deployment.yaml --namespace=assignment
-
kubectl apply -f redis-slave-service.yaml --namespace=assignment
-- INSERT -- 1,40 Top