-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question around openshift_portal_net parameter #3537
Comments
And situation gets even more interesting where i've added as per doc
My expectation was for the external-ip to match the cluster-ip subnet - i.e 10.1.111.x Also i see the clusternetwork set as below
|
openshift_portal_net sets the kubernetes service subnet, I don't believe this is actually subnetted instead as services are created and updated the kubelet is responsible for defining iptables nat rules which map to the pod ip addresses. I expect that the external-ip field is the list of pod ip addresses which would all be ip addresses assigned to the pods by the SDN. The SDN is routed and each host is given a @openshift/networking can you help answer some of these questions. |
thanks for the info @sdodson !! While i was trying to get to the bottom of it i came across https://github.com/redhat-cop/openshift-playbooks/blob/master/playbooks/operationalizing/ingress.adoc which suggest that
and then found that this is set by default by
Will appreciate if someone can confirm/ deny what i said above. |
And slowly but surely closing the loop ... i found the PR which implemented the code and has tons of v useful comments, including the usecase. Starting from Origin 1.3.3 + the default private subnet was changed from 172.46 to 172.29 - see below |
Right. Kubernetes just treats openshift_portal_net as a single subnet, essentially, and allocates IPs out of it randomly. (Though, nitpick: it's kube-proxy that defines the iptables rules, not kubelet.) |
will close this issue as i got all the answers, thanks @sdodson & @danwinship |
Hi all,
I'm running Origin 1.3 without any router deployed however with some services defined as
type: LoadBalancer
. (note this is a lab only for now)Now my questions are around the
openshift_portal_net
parameter which by default (as per doc) is set to172.30.0.0/16
.Now my questions are:
openshift_portal_net
relates to thecluster-ip
&external-ip
service?172.30.0.0/16
? I'm having hard time understanding how a different subnet - ie172.30.126.102
or172.30.96.49
gets allocated for each service. Same rule applies to the external-ip - different subnet (2nd octet) and then variance on 3rd/4th octet)@sdodson i've seen you were the last person who improved the doc around this area, by any chance do you know the answers to the above ?
Thanks in advance !
[1]
openshift-ansible/playbooks/common/openshift-node/config.yml
Line 44 in 2d52f7c
[2]
openshift-ansible/roles/openshift_facts/tasks/main.yml
Line 53 in 701bd04
The text was updated successfully, but these errors were encountered: