EKS Ingress(ALB) 생성하기- 1

kyungbin kim·2024년 3월 9일
0

SESAC Final Project

목록 보기
8/11

Try 1.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: backend-ingress
  namespace: backend
  annotations:
    alb.ingress.kubernetes.io/load-balancer-name: test-ingress
    alb.ingress.kubernetes.io/scheme: internet-facing
spec:
  rules:
  - http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: backend
            port:
              number: 80

Try 2.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: backend-ingress
  namespace: backend
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/target-type: instance
    alb.ingress.kubernetes.io/scheme: internet-facing
spec:
  rules:
  - http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: backend
            port:
              number: 80

Try 3.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: backend-ingress
  namespace: backend
  annotations:
    alb.ingress.kubernetes.io/controller: "true"
    alb.ingress.kubernetes.io/target-type: instance
    alb.ingress.kubernetes.io/scheme: internet-facing
spec:
  rules:
  - http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: backend
            port:
              number: 80
~

## happylivekkb/sesac:food 이미지로 테스트


> docker로 이미지 잘 돌아가는지 확인

1087 systemctl status docker
1088 systemctl start docker
1089 systemctl status docker

1090 docker images
1091 docker pull happylivekkb/sesac:food
1092 docker images

1106 docker container run -d -p 8888:80 --name food3 happylivekkb/sesac:food

1107 docker container ls

1100 docker ps -a







1151 kubectl exec -it backend-5448884c46-4pd8z -n backend -- bash








0개의 댓글