Skip to content
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

how to change PODcidr on specifiec nodes Kubernetes #87150

Open
itsecforu opened this issue Jan 13, 2020 · 4 comments
Open

how to change PODcidr on specifiec nodes Kubernetes #87150

itsecforu opened this issue Jan 13, 2020 · 4 comments

Comments

@itsecforu
Copy link

@itsecforu itsecforu commented Jan 13, 2020

Hello Folks!

I have setup a kubernete cluster with kubeadm in baremetal.

the cluster works well.

Next I connected some workers nodes.

But for some reason other IP addresses of Pods were assigned.

now when you deploy a service, if it is installed on one of these new nodes, errors appear.

Error - "NetworkPlugin cni failed to set up pod"

I don’t want to do init (kubeadm init --pod-network-cidr= )for obvious reasons, I'm afraid to break everything

Im using Calico as CNI plugin

/var/lib/kubelet/config.yaml:

address: 0.0.0.0
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
anonymous:
enabled: false
webhook:
cacheTTL: 2m0s
enabled: true
x509:
clientCAFile: /etc/kubernetes/ssl/ca.crt
authorization:
mode: Webhook
webhook:
cacheAuthorizedTTL: 5m0s
cacheUnauthorizedTTL: 30s
cgroupDriver: cgroupfs
cgroupsPerQOS: true
clusterDNS:
10.233.0.10
clusterDomain: cluster.local
configMapAndSecretChangeDetectionStrategy: Watch
containerLogMaxFiles: 5
containerLogMaxSize: 10Mi
contentType: application/vnd.kubernetes.protobuf
cpuCFSQuota: true
cpuCFSQuotaPeriod: 100ms
cpuManagerPolicy: none
cpuManagerReconcilePeriod: 10s
enableControllerAttachDetach: true
enableDebuggingHandlers: true
enforceNodeAllocatable:- pods
eventBurst: 10
eventRecordQPS: 5
evictionHard:
imagefs.available: 15%
memory.available: 100Mi
nodefs.available: 10%
nodefs.inodesFree: 5%
evictionPressureTransitionPeriod: 5m0s
failSwapOn: true
fileCheckFrequency: 20s
hairpinMode: promiscuous-bridge
healthzBindAddress: 127.0.0.1
healthzPort: 10248
httpCheckFrequency: 20s
imageGCHighThresholdPercent: 85
imageGCLowThresholdPercent: 80
imageMinimumGCAge: 2m0s
iptablesDropBit: 15
iptablesMasqueradeBit: 14
kind: KubeletConfiguration
kubeAPIBurst: 10
kubeAPIQPS: 5
makeIPTablesUtilChains: true
maxOpenFiles: 1000000
maxPods: 110
nodeLeaseDurationSeconds: 40
nodeStatusReportFrequency: 1m0s
nodeStatusUpdateFrequency: 10s
oomScoreAdj: -999
podPidsLimit: -1
port: 10250
registryBurst: 10
registryPullQPS: 5
resolvConf: /etc/resolv.conf
rotateCertificates: true
runtimeRequestTimeout: 2m0s
serializeImagePulls: true
staticPodPath: /etc/kubernetes/manifests
streamingConnectionIdleTimeout: 4h0m0s
syncFrequency: 1m0s
volumeStatsAggPeriod: 1m0s

@neolit123

This comment has been minimized.

Copy link
Member

@neolit123 neolit123 commented Jan 13, 2020

the kubelet allows you to pass --pod-cidr

https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/

on the workers you can have a look at the file /etc/default/kubelet (for debian) and add this extra flag there.

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/#the-kubelet-drop-in-file-for-systemd

/triage support
/sig cluster-lifecycle

@itsecforu

This comment has been minimized.

Copy link
Author

@itsecforu itsecforu commented Jan 14, 2020

the kubelet allows you to pass --pod-cidr

https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/

on the workers you can have a look at the file /etc/default/kubelet (for debian) and add this extra flag there.

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/#the-kubelet-drop-in-file-for-systemd

/triage support
/sig cluster-lifecycle

Thx for feedback!

First link:

The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. I got cluster in my case.

2-nd link:

Im on Centos 7. And my /etc/default contains only : grub, nss, useradd

@neolit123

This comment has been minimized.

Copy link
Member

@neolit123 neolit123 commented Jan 14, 2020

The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. I got cluster in my case.

i forgot about this detail. then i don't think there is a way to set this per node.

/remove-sig cluster-lifecycle
/sig node network

@athenabot

This comment has been minimized.

Copy link

@athenabot athenabot commented Jan 14, 2020

/triage unresolved

Comment /remove-triage unresolved when the issue is assessed and confirmed.

🤖 I am a bot run by vllry. 👩‍🔬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.