@@ -137,7 +137,8 @@ Host ports that are not defined, or else defined as zero, will automatically be
To disable the work-around and revert to vanilla Kubernetes service endpoint termination:
- execute the k8sm controller-manager with `-host_port_endpoints=false`;
- execute the k8sm scheduler with `-host-port-endpoints=false`
- execute the k8sm controller-manager with `-host-port-endpoints=false`
Then the usual Kubernetes network assumptions must be fulfilled for Kubernetes to work with Mesos, i.e. each container must get a cluster-wide routable IP (compare [Kubernetes Networking documentation](../../../docs/design/networking.md#container-to-container)).
// AddFlags adds flags for a specific CMServer to the specified FlagSet
func(s*CMServer)AddFlags(fs*pflag.FlagSet){
s.CMServer.AddFlags(fs)
fs.BoolVar(&s.UseHostPortEndpoints,"host_port_endpoints",s.UseHostPortEndpoints,"Map service endpoints to hostIP:hostPort instead of podIP:containerPort. Default true.")
fs.BoolVar(&s.UseHostPortEndpoints,"host-port-endpoints",s.UseHostPortEndpoints,"Map service endpoints to hostIP:hostPort instead of podIP:containerPort. Default true.")
conntrackTCPTimeoutEstablished:0,// non-zero values may require hand-tuning other sysctl's on the host; do so with caution
useHostPortEndpoints:true,
// non-zero values can trigger failures when updating /sys/module/nf_conntrack/parameters/hashsize
// when kube-proxy is running in a non-root netns (init_net); setting this to a non-zero value will
...
...
@@ -293,6 +296,7 @@ func (s *SchedulerServer) addCoreFlags(fs *pflag.FlagSet) {
fs.Var(&s.defaultContainerMemLimit,"default-container-mem-limit","Containers without a memory resource limit are admitted this much amount of memory in MB")
fs.BoolVar(&s.containPodResources,"contain-pod-resources",s.containPodResources,"Reparent pod containers into mesos cgroups; disable if you're having strange mesos/docker/systemd interactions.")
fs.DurationVar(&s.nodeRelistPeriod,"node-monitor-period",s.nodeRelistPeriod,"Period between relisting of all nodes from the apiserver.")
fs.BoolVar(&s.useHostPortEndpoints,"host-port-endpoints",s.useHostPortEndpoints,"Map service endpoints to hostIP:hostPort instead of podIP:containerPort. Default true.")
fs.IntVar(&s.executorLogV,"executor-logv",s.executorLogV,"Logging verbosity of spawned minion and executor processes.")
fs.BoolVar(&s.executorBindall,"executor-bindall",s.executorBindall,"When true will set -address of the executor to 0.0.0.0.")