Python Web Application Deployment with Docker and Kubernetes, Create K8s Deployment and Service, deploy this docker application as a deployment on k8s cluster.
This repository contains files necessary to deploy a Python web application using Docker and Kubernetes.
- Dockerfile: This file contains instructions to build a Docker image for the Python web application.
- Kubernetes Deployment (deployment.yaml): This YAML file describes how to deploy your application on Kubernetes, including the number of replicas and the Docker image to use.
- Kubernetes Service (service.yaml): This YAML file defines a Kubernetes service to expose your application outside of the cluster.
To deploy your application:
- Ensure you have Docker installed and Kubernetes configured.
- Build the Docker image using the provided Dockerfile.
- Push the Docker image to a registry accessible to your Kubernetes cluster.
- Apply the deployment and service files using
kubectl apply -f deployment.yaml
andkubectl apply -f service.yaml
. - Access your application via the NodePort defined in the service configuration.