Score:0

Error accessing MySQL endpoints through nginx ingress in eks

zm flag

I got 3 node on aws eks.

I want to use mysql client and access the database via Nginx Ingress.

this is my yaml.

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: ext-nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: ext-nginx-ingress
  namespace: ext-nginx-ingress
spec:
  rules:
    - host: mysql.***********.com
      http:
        paths:
          - backend:
              serviceName: mysql-svc
              servicePort: 3306
            path: /
            pathType: ImplementationSpecific
          - backend:
              serviceName: nginx-svc
              servicePort: 80
            path: /nginx
            pathType: ImplementationSpecific

describe my ingress service

tes.io/name=ingress-nginx
Type:                     LoadBalancer
IP:                       172.20.209.228
LoadBalancer Ingress:     ************.elb.ap-northeast-2.amazonaws.com
Port:                     http  80/TCP
TargetPort:               http/TCP
NodePort:                 http  31218/TCP
Endpoints:                10.11.53.243:80
Port:                     https  443/TCP
TargetPort:               https/TCP
NodePort:                 https  31308/TCP
Endpoints:                10.11.53.243:443
Port:                     proxie-tcp-mysql  3306/TCP
TargetPort:               mysql/TCP
NodePort:                 proxie-tcp-mysql  32514/TCP
Endpoints:                
Session Affinity:         None
External Traffic Policy:  Cluster

configmap

apiVersion: v1
kind: ConfigMap
metadata:
  name: tcp-services
  namespace: ext-nginx-ingress
data:
  3306: ext-nginx-ingress/mysql-svc:3306

Accessible by telnet 80 port but not by mysql client.

telnet mysql.*****.com 80                          
Trying 3.******...
Connected to mysql.******.com.

Of the target groups associated with nlb, the node port associated with 3306 ports is in the unhealthy state.

Port:                     proxie-tcp-mysql  3306/TCP
TargetPort:               mysql/TCP
NodePort:                 proxie-tcp-mysql  32514/TCP

Thank you for reading. MYSQL Pod and Service create well endpoint.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.