Containers and Kubernetes

Get Involved. Join the Conversation.

Topic

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

    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 ( 10.0.0.0/16) 

    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 ?

    thanks 

    Comment

     

    • 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.

      See https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/localVCNpeering.htm.