Code Monkey home page Code Monkey logo

Comments (3)

shettyg avatar shettyg commented on July 21, 2024

@gopinatht

Couple of things.

  1. Can you try accessing 10.10.0.11:31269 from outside of your cluster (say from your host and not from VMs). Since in the vagrant we share the same IP for mgmt as well as data, access of it from inside the cluster does not work.

  2. In your case of sshing into "apachetwin" and accessing curl 192.168.200.252:8800, you are effectively asking to loadbalance back to yourself, which won't work. You can create
    a) Try to access 'curl 192.168.200.252:8800' from a k8s-master (or other VMs). Try to access 'curl 192.168.200.98:8800' from the VMs too.
    b) Create a new pod (unrelated to the service) and try to access 'curl 192.168.200.98:8800' from it.

from ovn-kubernetes.

gopinatht avatar gopinatht commented on July 21, 2024

@shettyg Many thanks for the explanation. Both your scenarios (from host and service IP from VM) work.

We can close this case.

I am interested in understanding how the kubernetes service IP is accessible from the VM. Is there any documentation around this? Also, why are the Pods not able to reach the internet? How can I program the switch to allow access to internet for the pods?

from ovn-kubernetes.

shettyg avatar shettyg commented on July 21, 2024

I am interested in understanding how the kubernetes service IP is accessible from the VM.

When we initialize the setup by running, "ovn-k8s-overlay master-init" or "ovn-k8s-overlay minion-init", we create a OVS interface on that VM which and give it a IP address. For e.g., If you run

 ovn-k8s-overlay master-init \
  --cluster-ip-subnet="192.168.0.0/16" \
  --master-switch-subnet="192.168.1.0/24" \
  --node-name="kube-master"

We create a OVS device (a logical switch port in the virtual world) on "kube-master" with IP 192.168.1.2/24 and add a routing entry on host that says 192.168.0.0/16 is reachable from 192.168.1.2/24 via 192.168.1.1. That is how you can access service IPs from inside the nodes.

Also, why are the Pods not able to reach the internet?

That is because in the vagrant, the interface via which we add nodeport is not connected to the internet. It is private. If you create the same setup in real world where the interface that we provide for OVN gateways in 'ovn-k8s-overlay gateway-init' (on which we program nodeport) has reachability for outside internet, it will automatically work.

from ovn-kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.