How to connect to VM Mysql Databases by using AKS?
How to connect to VM Mysql Databases by using AKS
I have a aks pod service, need to connent VM Databases,
They are in the same Resource Groups
but in the pod, I can't connect databases
How can I do ?
I have already opened port 3306 and adjusted Security group rules, but it does not work.
Did you allow all the IPs to be able to connect to VM with Mysql Databases or only outbound IP of AKS cluster?
Hello, We did not set any ip allow or deny conditions
So We think in the same resource group, AKS Cluster and VM databases should can connect each other
We use other VM2 (in the same resource group), it can connect VM database
But in cluster pod, it can't connect the VM databases
I create Virtual Net Peering,and open VM 3306 port, but it is not work...
Are you using Azure CNI networking or Kubenet ?
Both the VM & AKS are in different VNET and you are peering those ?
When you login to the pod and do a nslookup or dig or nc commands what is the outputs ?
I use kubenet, and create VNet Peering,
and then I find the reson is because Insufficient account permissions
, and I select the other one Kbuenet,
Now, I have open permissions，and select correct Kubenet to create VNet Peering
The AKS can connect the VM DB now
I refrence this article, maybe someone need ~~haha
I'm very grateful for your help
Sign in to comment
Sort by: Most helpful
Original poster shared the resolution as below:
I use kubenet, and created VNet Peering
I found that the reason was Insufficient account permissions
Now, I have open permissions and selected correct Kubenet to create VNet Peering.
The AKS can connect the VM DB now.
I referenced this article : https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering