apiVersion: extensions/v1beta1 kind: Ingress metadata: name: springbootsample namespace: default annotations: kubernetes.io/ingress.class: alb alb.ingress.kubernetes.io/scheme: internet-facing alb.ingress.kubernetes.io/tags: Project=springbootsample spec: rules: - http: paths: - path: /* backend: serviceName: springbootsample servicePort: 80 --- apiVersion: v1 kind: Service metadata: name: springbootsample spec: type: LoadBalancer selector: app: springbootsample ports: - protocol: TCP port: 80 targetPort: 8080 --- apiVersion: apps/v1 kind: Deployment metadata: name: springbootsample labels: app: springbootsample namespace: default spec: replicas: 2 selector: matchLabels: app: springbootsample strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: labels: app: springbootsample spec: containers: - image: {ecr_image} imagePullPolicy: Always name: springbootsample ports: - containerPort: 8080 protocol: TCP env: - name: springbootsample.redis.host value: {redis_host} - name: springbootsample.redis.port value: "{redis_port}" - name: spring.datasource.url value: {rds_url} - name: spring.datasource.username value: {secret_name} - name: spring.datasource.driver-class-name value: com.amazonaws.secretsmanager.sql.AWSSecretsManagerMySQLDriver - name: node valueFrom: fieldRef: fieldPath: spec.nodeName