apiVersion: apps/v1 kind: Deployment metadata: name: deployment-three spec: selector: matchLabels: app: three replicas: 3 template: metadata: labels: app: three spec: containers: - name: webapp image: happylivekkb/sesac:food ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: service-three spec: selector: app: three ports: - protocol: TCP port: 80 targetPort: 80 type: NodePort --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-three annotations: alb.ingress.kubernetes.io/scheme: internet-facing alb.ingress.kubernetes.io/target-type: ip spec: ingressClassName: alb rules: - http: paths: - path: / pathType: Prefix backend: service: name: service-three port: number: 80
수정형
apiVersion: apps/v1 kind: Deployment metadata: name: be-deploy namespace: backend spec: selector: matchLabels: app: be replicas: 3 template: metadata: labels: app: be spec: containers: - name: be-container image: happylivekkb/sesac:food ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: be-svc namespace: backend spec: selector: app: be ports: - protocol: TCP port: 80 targetPort: 80 type: ClusterIP --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: be-ingress namespace: backend annotations: alb.ingress.kubernetes.io/scheme: internet-facing alb.ingress.kubernetes.io/target-type: ip spec: ingressClassName: alb rules: - http: paths: - path: / pathType: Prefix backend: service: name: be-svc port: number: 80