Containers and Kubernetes

Get Involved. Join the Conversation.


    enrique ortiz
    kubernetes and database public IP
    Topic posted July 14, 2019 by enrique ortizRed Ribbon: 250+ Points 
    23 Views, 1 Comment
    kubernetes and database public IP

    hi all

    we have created an kubernetes cluster , so it created an vcn and subnets in the kubernetes compartment 

    we have some databases in another vcn so the ranges of ips are the same ( 

    we need to connect the pods with database using jdbc and used the public ip of the databases ( 130.X ) ,so 

    - is there a way to connect two vcn ?

    - its better to use the private ip  ?, whats the difference if using a private IP ?




    • Kumar Dhanagopal

      I suggest creating the K8s cluster in a VCN that has a different CIDR range than the VCN that's used for the DB. That way, you can use local VCN peering to enable the K8s cluster nodes to communicate with the DB using its private address, instead of routing over the public internet.