Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Tweaks to network config (#1408)
Browse files Browse the repository at this point in the history
* Tweaks to network config

Fixes #1407.

For now just document the `podCIDR` aspects but we should probably switch the default based on the networking setup, possibly combine this config with the `selfHosting` config into a networking section.

* Correct pod CIDR notes
  • Loading branch information
c-knowles authored and mumoshu committed Sep 16, 2018
1 parent 8c15501 commit 52fb54c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/controlplane/config/templates/cloud-config-controller
Original file line number Diff line number Diff line change
Expand Up @@ -1176,12 +1176,13 @@ write_files:
# The CNI network configuration to install on each node.
cni_network_config: |-
{
"name": "calico",
"cniVersion": "0.3.0",
"name": "k8s-pod-network",
"cniVersion": "0.3.1",
"plugins": [
{
"type": "calico",
"log_level": "info",
"mtu": 8951,
"datastore_type": "kubernetes",
"nodename": "__KUBERNETES_NODE_NAME__",
"ipam": {
Expand All @@ -1200,7 +1201,8 @@ write_files:
{
"type": "portmap",
"capabilities": {"portMappings": true},
"snat": true
"snat": true,
"externalSetMarkChain": "KUBE-MARK-MASQ"
}
]
}
Expand Down Expand Up @@ -3580,8 +3582,8 @@ write_files:
{{ if .Kubernetes.Networking.SelfHosting.Enabled -}}
- --allocate-node-cidrs=true
- --cluster-cidr={{.PodCIDR}}
{{/* no need to auto configure cloud routes when using flannel or canal */}}
- --configure-cloud-routes=false
- --configure-cloud-routes=false {{/* no need to auto configure cloud routes when using flannel or canal */}}
- --service-cluster-ip-range={{.ServiceCIDR}} {{/* removes the service CIDR range from the cluster CIDR if it intersects */}}
{{- end }}
{{ if not .Addons.MetricsServer.Enabled -}}
- --horizontal-pod-autoscaler-use-rest-clients=false
Expand Down
1 change: 1 addition & 0 deletions core/root/config/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ worker:
# serviceCIDR: "10.3.0.0/24"

# CIDR for all pod IP addresses
# Typically set to 10.244.0.0/16 for Flannel or Canal and 192.168.0.0/16 for Calico
# podCIDR: "10.2.0.0/16"

# IP address of Kubernetes dns service (must be contained by serviceCIDR)
Expand Down

0 comments on commit 52fb54c

Please sign in to comment.