Asking for help? Comment out what you need so we can get more information to help you!
Cluster information:
Kubernetes version: 1.18.9
Installation method: kubeadm
I want to use service in pod to connect Externel Mysql but not use
in kubernetes i use calico i want to use service and endpoint to connect a externel mysql like this
apiVersion: v1
kind: Service
metadata:
name: mysql-test
spec:
clusterIP: None
ports:
- port: 3306
apiVersion: v1
kind: Endpoints
metadata:
name: mysql-test
subsets:
- addresses:
- ip: 10.103.34.7
ports: - port: 3306
- ip: 10.103.34.7
In hope that i can use clusterIp + port to connect Externel mysql in pod
Current Behavior
in cluster node or pod i can telnet clusterIp port this Service ,
telnet 10.103.34.7 3306
Trying 10.103.34.7…
Connected to 10.103.34.7.
Escape character is ‘^]’.
when I connect to the database, the authentication fails. But If I add the allowed nodeip node link to the database, the authentication is successful
Connections to databases, Redis and MQ are converted via NAT to Node’s IP?
Since POD’s node nodes are randomly scheduled, I don’t know how to add permission control to the database