jhunt / k8s-boshrelease

A BOSH Release for deploying Kubernetes clusters
MIT License
13 stars 9 forks source link

Bad kubeproxy configuration #58

Closed obeyler closed 4 years ago

obeyler commented 4 years ago

Inside log of kube proxy, 2 items seems to cause trouble on parsing : max: 0 and resourceContainer: /kube-proxy

Inside the log of kube proxy I see some error,

kubectl logs -n kube-system kube-proxy-89zv6
W0702 17:19:47.678898       1 server.go:439] using lenient decoding as strict decoding failed: strict decoder error for ---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
bindAddress: "0.0.0.0"
clientConnection:
  acceptContentTypes: ""
  burst: 10
  contentType: application/vnd.kubernetes.protobuf
  kubeconfig: /etc/kubeconfig.yml
  qps: 5
clusterCIDR: "10.244.0.0/16"
configSyncPeriod: 15m0s
conntrack:
  max: 0
  maxPerCore: 32768
  min: 131072
  tcpCloseWaitTimeout: 1h0m0s
  tcpEstablishedTimeout: 24h0m0s
enableProfiling: false
healthzBindAddress: 0.0.0.0:10256
iptables:
  masqueradeAll: false
  masqueradeBit: 14
  minSyncPeriod: 0s
  syncPeriod: 30s
kind: KubeProxyConfiguration
metricsBindAddress: 127.0.0.1:10249
mode: "iptables"
nodePortAddresses: []
oomScoreAdj: -999
portRange: ""
resourceContainer: /kube-proxy
udpIdleTimeout: 250ms: v1alpha1.KubeProxyConfiguration.Conntrack: v1alpha1.KubeProxyConntrackConfiguration.ReadObject: found unknown field: max, error found in #10 byte of ...|ck":{"max":0,"maxPer|..., bigger context ...|/16","configSyncPeriod":"15m0s","conntrack":{"max":0,"maxPerCore":32768,"min":131072,"tcpCloseWaitTi|...
I0702 17:19:47.938182       1 node.go:136] Successfully retrieved node IP: 192.168.244.209
I0702 17:19:47.938219       1 server_others.go:186] Using iptables Proxier.
I0702 17:19:47.938513       1 server.go:583] Version: v1.18.5
I0702 17:19:47.938949       1 conntrack.go:100] Set sysctl 'net/netfilter/nf_conntrack_max' to 131072
I0702 17:19:47.939074       1 conntrack.go:52] Setting nf_conntrack_max to 131072
jhunt commented 4 years ago

See https://godoc.org/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration

jhunt commented 4 years ago

Fixed in aeb9bba, and verified that the kube-proxy pods all got a clean bill of health.