--- apiVersion: apps/v1 kind: Deployment # Kubernetes resource kind we are creating metadata: name: cicd-java-spring-boot-deployment namespace: prototype-loafle-net spec: selector: matchLabels: app: cicd-java-spring-boot-app replicas: 1 # Number of replicas that will be created for this deployment template: metadata: labels: app: cicd-java-spring-boot-app spec: containers: - name: cicd-java-spring-boot-app image: __REGISTRY_URL__/__IMAGE_NAME__:__IMAGE_TAG__ # Image that will be used to containers in the cluster imagePullPolicy: Always ports: - containerPort: 8080 env: - name: DEPLOY_DATE value: '__DEPLOY_DATE__' --- apiVersion: v1 # Kubernetes API version kind: Service # Kubernetes resource kind we are creating metadata: # Metadata of the resource kind we are creating name: cicd-java-spring-boot-service namespace: prototype-loafle-net spec: selector: app: cicd-java-spring-boot-app ports: - protocol: "TCP" port: 8080 # The port that the service is running on in the cluster targetPort: 8080 # The port exposed by the service