#Docker File to copy war file: FROM tomcat COPY app.war /usr/local/tomcat/webapps # ---- Build it --- docker build --nocache -t /: #----- Push it into Docker ----- docker push /: ## Kubernates ## apiVersion: apps/v1 kind: Deployment metadata: name: app-deploy namespace: Prod spec: replicas: 3 template: metadata: labels: app: hello-world spec: containers: - name: tomcat_pod image: /: ports: - containerPort: 8080 ### Create a Service to access Pods ###### kind: Service apiVersion: v1 metadata: name: tomcat-service spec: selector: app: tomcat ports: - protocol: TCP port: 80 targetPort: 8080 ### You can now access your pod inside the cluster with http://tomcat-service.Prod/app ##