ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 서비스 endpoints
    kubernetes 2023. 10. 31. 16:45
    apiVersion: v1
    kind: Service
    metadata:
      name: my-service
    spec:
      ports:
       - protocol: TCP
         port: 80
         targetPort: 80

    ---
    apiVersion: v1
    kind: Endpoints
    metadata:
      name: my-service
    subsets:
      - addresses:
          - ip: 223.130.195.200
          - ip: 199.201.110.204
        ports:
          - port: 80

     

     

     

    kubectl run http-go --image=qkrwo8520/http-go
    kubectl exec -it http-go -- bash
    curl my-service

    http-go에서 my-service로 접속 시 malware 사이트 확인 가능

     

     

    kubectl describe svc my-service

    endpoints 잘 설정된걸 확인할수있다

     

    'kubernetes' 카테고리의 다른 글

    서비스 노드 포트  (0) 2023.11.01
    mysql db 인중화  (0) 2023.10.31
    서비스  (0) 2023.10.31
    버번패치 실습  (0) 2023.10.30
    버전패치  (1) 2023.10.30
Designed by Tistory.