apiVersion: apps/v1 kind: Deployment metadata: name: hellopython namespace: default spec: selector: matchLabels: app: hellopython replicas: 2 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 template: metadata: labels: app: hellopython spec: containers: - name: hellopython image: ${image_name} imagePullPolicy: Always ports: - containerPort: 8000 #if you want to change this, remember to change in docker file expose port as well --- apiVersion: v1 kind: Service metadata: name: hellopython-service namespace: default labels: app: hellopython spec: selector: app: hellopython type: ClusterIP ports: - port: ${public_port} targetPort: 8000 #if you want to change this, remember to change in docker file expose port as well --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: hellopython-ingress-app annotations: cert-manager.io/cluster-issuer: letsencrypt-prod spec: ingressClassName: nginx rules: - host: pythondemo.arsit.tech http: paths: - path: / pathType: Prefix backend: service: name: hellopython-service port: number: ${public_port} tls: - hosts: - pythondemo.arsit.tech secretName: arsit-tls