Home
%3CLINGO-SUB%20id%3D%22lingo-sub-508648%22%20slang%3D%22en-US%22%3ETroubleshooting%20Kubernetes%20Networking%20on%20Windows%3A%20Part%201%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-508648%22%20slang%3D%22en-US%22%3E%3CP%3EWe%E2%80%99ve%20all%20been%20there%3A%20Sometimes%20things%20just%20don%E2%80%99t%20work%20the%20way%20they%20should%20even%20though%20we%20followed%20everything%20down%20to%20a%20T.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20500px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111261iDDC9194EAE0831DD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22giphy%22%20title%3D%22giphy%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EKubernetes%20in%20particular%2C%20is%20not%20easy%20to%20troubleshoot%20%E2%80%93%20even%20if%20you%E2%80%99re%20an%20expert.%20There%26nbsp%3Bare%26nbsp%3Bmultiple%26nbsp%3Bcomponents%20involved%26nbsp%3Bin%20the%20creation%2Fdeletion%20of%20containers%26nbsp%3Bthat%20must%20all%20harmoniously%20interoperate%26nbsp%3Bend-to-end.%20For%20example%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EInbox%26nbsp%3Bplatform%26nbsp%3Bservices%26nbsp%3B(e.g.%26nbsp%3BWinNAT%2C%20HNS%2FHCS%2C%20VFP)%3C%2FLI%3E%0A%3CLI%3EContainer%26nbsp%3Bruntimes%26nbsp%3B%26amp%3B%26nbsp%3BGo-wrappers%20(e.g.%26nbsp%3BDockershim%2C%26nbsp%3BContainerD%2C%26nbsp%3Bhcsshim)%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EContainer%20orchestrator%20processes%26nbsp%3B(e.g.%20kube-proxy%2C%26nbsp%3Bkubelet)%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3ECNI%26nbsp%3Bnetwork%26nbsp%3Bplugins%26nbsp%3B(e.g.%26nbsp%3Bwin-bridge%2C%20win-overlay%2C%20azure-cni)%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EIPAM%20plugins%20(e.g.%20host-local)%3C%2FLI%3E%0A%3CLI%3EAny%20other%26nbsp%3Bhost-agent%20processes%2Fdaemons%26nbsp%3B(e.g.%20FlannelD%2C%20Calico-Felix%2C%20etc.)%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3E%E2%80%A6%20(more%20to%20come!)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%2C%20in%20turn%2C%20also%20means%20that%20the%20potential%20problem%20space%20to%20investigate%20can%20grow%20overwhelmingly%20large%20when%20things%20%3CSTRONG%3Edo%3C%2FSTRONG%3E%20end%20up%20breaking%2C%20manifesting%20in%20sentiments%20such%20as%20%3CEM%3E%E2%80%9CI%20don%E2%80%99t%20even%20know%20where%20to%20begin.%E2%80%9D%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20intent%20of%20this%20blog%20post%20is%20to%20educate%20the%20reader%20on%20the%20available%20tools%20and%20resources%20that%20can%20help%20unpeel%20the%20first%20few%20layers%20of%20the%20onion%3B%20it%20is%20not%20intended%20to%20be%20a%20fully%20exhaustive%20guide%20to%20root-cause%20every%20possible%20bug%20for%20every%20possible%20configuration.%20However%2C%20by%20the%20end%20one%20should%20at%20least%20be%20able%20to%20narrow%20down%20on%20an%20observable%20symptom%20through%20a%20pipeline%20of%20analytical%20troubleshooting%20steps%20and%20come%20out%20with%20a%20better%20understanding%20of%20what%20the%20underlying%20issue%20could%20be.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3ENOTE%3A%20Most%20of%20the%20content%20in%20this%20blog%20is%20directly%20taken%20from%20the%20amazing%20Kubecon%20Shanghai%20%E2%80%9918%20video%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtTZFoiLObX4%26amp%3Bfeature%3Dyoutu.be%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%E2%80%9CUnderstanding%20Windows%20Container%20Networking%20in%20Kubernetes%20Using%20a%20Real%20Story%E2%80%9D%3C%2FA%3E%20%3CSPAN%3E%26nbsp%3Bby%20Cindy%20Xing%20(Huawei)%20and%20Dinesh%20Kumar%20Govindasamy%20(Microsoft)%3C%2FSPAN%3E.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3ETable%20of%20Contents%3C%2FFONT%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CA%20href%3D%22%23ensure-k8s-installed%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EEnsure%20Kubernetes%20is%20installed%20and%20running%20correctly%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20style%3D%22font-family%3A%20inherit%3B%20background-color%3A%20%23ffffff%3B%22%20href%3D%22%23use-validate-script%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EUse%20a%20script%20to%20validate%20basic%20cluster%20connectivity%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22%23query-event-logs%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EQuery%20the%20built-in%20Kubernetes%20event%20logs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22%23analyze-kube-logs%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAnalyze%20kubelet%2C%20kube-proxy%20logs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22%23inspect-cni-config%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EInspect%20CNI%20network%20plugin%20configuration%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22%23verify-hns-networking%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVerify%20HNS%20networking%20state%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22%23analyze-collectlogs%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ETake%20a%20snapshot%20of%20your%20network%20using%20CollectLogs.ps1%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22%23capture-packets%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ECapture%20packets%20and%20analyze%20network%20flows%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH2%20id%3D%22toc-hId-1730712857%22%20id%3D%22toc-hId-1730712857%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--821444104%22%20id%3D%22toc-hId--821444104%22%3E%3CA%20id%3D%22ensure-k8s-installed%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%201%3A%20Ensure%20Kubernetes%20is%20installed%20and%20running%20correc%3CFONT%20size%3D%225%22%3Etly%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3EAs%20mentioned%20in%20the%20introduction%2C%20there%20are%20%3CEM%3Ea%20lot%3C%2FEM%3E%20of%20different%20platform%20and%20open-source%20actors%20that%20are%20needed%20to%20operate%20a%20Kubernetes%20cluster.%20It%20can%20be%20hard%20to%20keep%20track%20of%20all%20of%20them%20-%20especially%20given%20that%20they%20release%20at%20a%20different%20cadence.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20quick%20sanity-check%20that%20can%20be%20done%20without%20any%20external%20help%20is%20to%20employ%20a%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fkubernetes-sigs%2Fwindows-testing%2Fblob%2F188e78fe46b38601c9b7155c5e59a9a7199d9e39%2Fscripts%2FDebug-WindowsNode.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Evalidation%20script%3C%2FA%3E%20that%20verifies%20supported%20bits%20are%20installed%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20878px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111265i47A0D04EB31F2765%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22verify_installation.png%22%20title%3D%22verify_installation.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EVerifying%20Kubernetes%20is%20installed%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhile%20deceivingly%20obvious%2C%20another%20step%20that%20can%20be%20equally%20easily%20overlooked%20is%20ensuring%20that%20all%20the%20components%20are%20indeed%20running.%20Any%20piece%20of%20software%20can%20crash%20or%20enter%20a%20deadlock%20state%2C%20including%20host-agent%20processes%20such%20as%20kubelet.exe%20or%20kube-proxy.exe.%20This%20can%20result%20in%20unexpected%20cluster%20behavior%20and%20detached%20node%2Fcontainer%20states%2C%20but%20thankfully%20it%E2%80%99s%20easy%20to%20check.%20Running%20a%20simple%20ps%20command%20usually%20suffices%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20630px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111264i205A93C038A8C849%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ps.png%22%20title%3D%22ps.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ETypical%20Kubernetes%20processes%20running%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EUnfortunately%2C%20the%20above%20command%20won%E2%80%99t%20capture%20that%20the%20processes%20themselves%20could%20be%20stuck%20waiting%20in%20a%20deadlock-like%20state%3B%20we%20will%20cover%20this%20case%20briefly%20in%20step%204.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-921366231%22%20id%3D%22toc-hId-921366231%22%3E%3CA%20id%3D%22use-validate-script%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%202%3A%20Use%20a%20script%20to%20validate%20basic%20cluster%20connectivity%3C%2FH2%3E%0A%3CP%3EBefore%20diving%20head-first%20into%20analyzing%20HNS%20resources%20and%20verbose%20logs%2C%20there%20is%20a%20handy%20Pester%20test%20suite%20which%20allows%20you%20to%20validate%20basic%20connectivity%20scenarios%20and%20report%20on%20success%2Ffailure%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FSDN%2Fblob%2Fmaster%2FKubernetes%2Fwindows%2Ftest%2FValidateKubernetes.Pester.tests.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%20The%20only%20pre-requisite%20in%20order%20to%20run%20it%20is%20that%20you%20are%20using%20Windows%20Server%202019%20%26nbsp%3B(requires%20minor%20fix-up%20otherwise)%20and%20that%20you%20have%20more%20than%20one%20node%20for%20the%20remote%20pod%20test%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111262i84532A697216F4CD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22K8s_pester_tests.PNG%22%20title%3D%22K8s_pester_tests.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ESnippet%20from%20Kubernetes%20Connectivity%20Test%20Suite%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20intent%20of%20running%20this%20script%20is%20to%20have%20a%20quick%20glance%20of%20overall%20networking%20health%2C%20as%20well%20as%20hopefully%20accelerate%20subsequent%20steps%20by%20knowing%20what%20to%20look%20for.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1630790730%22%20id%3D%22toc-hId--1630790730%22%3E%3CA%20id%3D%22query-event-logs%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%203%3A%20Query%20the%20built-in%20Kubernetes%20event%20logs%3C%2FH2%3E%0A%3CP%3EAfter%20verifying%20that%20all%20the%20processes%20are%20running%20as%20expected%2C%20the%20next%20step%20is%20to%20query%20the%20built-in%20Kubernetes%20event%20logs%20and%20see%20what%20the%20basic%20built-in%20health-checks%20that%20ship%20with%20K8s%20have%20to%20say%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20926px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111267i35BD29DEAF55E0AC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22kubectl_get_pods.png%22%20title%3D%22kubectl_get_pods.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EKubernetes%20pods%20that%20are%20stuck%20in%20%22ContainerCreating%22%20state%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMore%20Information%20about%20misbehaving%20Kubernetes%20resources%20such%20as%20event%20logs%20can%20be%20viewed%20using%20the%20%E2%80%9Ckubectl%20describe%E2%80%9D%20command.%20For%20example%2C%20one%20frequent%20misconfiguration%20on%20Windows%20is%20having%20a%20misconfigured%20%E2%80%9Cpause%E2%80%9D%20container%20with%20a%20kernel%20version%20that%20doesn%E2%80%99t%20match%20the%20host%20OS%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111269i2709E6346C731D5B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22pause_container.gif%22%20title%3D%22pause_container.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EShared%20pause%20container%20vNIC%20in%20a%20pod%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20are%20the%20corresponding%20event%20logs%20from%20kubectl%20describe%20output%2C%20where%20we%20accidentally%20built%20our%20%E2%80%9Ckubeletwin%2Fpause%E2%80%9D%20image%20on%20top%20of%20a%20Windows%20Server%2C%20version%201803%20container%20image%20and%20ran%20it%20on%20a%20Windows%20Server%202019%20host%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F112988i10DB5A7D8FDE51A6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22eventlogs%20-%20highlighted.png%22%20title%3D%22eventlogs%20-%20highlighted.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EErroneous%20Kubernetes%20event%20logs%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E(On%20a%20side%20note%2C%20this%20specific%20example%20issue%20can%20be%20avoided%20altogether%20if%20one%20references%20the%26nbsp%3B%20multi-arch%20pause%20container%20image%20mcr.microsoft.com%2Fk8s%2Fcore%2Fpause%3A1.0.0%20which%20will%20run%20on%20both%20Windows%20Server%2C%20version%201803%20and%20Windows%20Server%202019).%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-112019605%22%20id%3D%22toc-hId-112019605%22%3E%3CA%20id%3D%22analyze-kube-logs%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%204%3A%20Analyze%20kubelet%2C%20kube-proxy%20logs%3C%2FH2%3E%0A%3CP%3EAnother%20useful%20source%20of%20information%20that%20can%20be%20leveraged%20to%20perform%20root-cause%20analysis%20for%20failing%20container%20creations%20is%20the%20kubelet%2C%20FlannelD%2C%20and%20kube-proxy%20logs.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThese%20components%20all%20have%20different%20responsibilities.%20Here%20is%20a%20very%20brief%20summary%20of%20what%20they%20do%20which%20should%20give%20you%20a%20rough%20idea%20on%20what%20to%20watch%20out%20for%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%20960px%3B%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22width%3A%20100px%3B%22%3E%3CP%3E%3CSTRONG%3EComponent%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%20578.889px%3B%22%3E%3CP%3E%3CSTRONG%3EResponsibility%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2040px%3B%22%3E%3CP%3E%3CSTRONG%3EWhen%20to%20inspect%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22width%3A%20100px%3B%22%3E%3CP%3EKubelet%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%20578.889px%3B%22%3E%3CP%3EInteracts%20with%20container%20runtime%20(e.g.%20Dockershim)%20to%20bring%20up%20containers%20and%20pods.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2040px%3B%22%3E%3CP%3EErroneous%20pod%20creations%2Fconfigurations%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22width%3A%20100px%3B%22%3E%3CP%3EKube-proxy%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%20578.889px%3B%22%3E%3CP%3EManages%20network%20connectivity%20for%20containers%20(programming%20policies%20used%20for%20NAT%E2%80%99ing%20or%20load%20balancing).%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2040px%3B%22%3E%3CP%3EMysterious%20network%20glitches%2C%20in%20particular%20for%20service%20discovery%20and%20communication%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22width%3A%20100px%3B%22%3E%3CP%3EFlannelD%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%20578.889px%3B%22%3E%3CP%3EResponsible%20for%20keeping%20all%20the%20nodes%20in%20sync%20with%20the%20rest%20of%20the%20cluster%20for%20events%20such%20as%20node%20removal%2Faddition.%20This%20consists%20of%20assigning%20IP%20blocks%20(pod%20subnets)%20to%20nodes%20as%20well%20as%20plumbing%20routes%20for%20inter-node%20connectivity.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2040px%3B%22%3E%3CP%3EFailing%20inter-node%20connectivity%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELog%20files%20for%20all%20of%20these%20components%20can%20be%20found%20in%20different%20locations%3B%20by%20default%20a%20log%20dump%20for%20kubelet%20and%20kube-proxy%20is%20generated%20in%20the%20C%3A%5Ck%20directory%2C%20though%20some%20users%20opt%20to%20log%20to%20a%20different%20directory.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20the%20logs%20appear%20to%20not%20have%20updated%20in%20a%20longer%20time%2C%20then%20perhaps%20the%20process%20is%20stuck%2C%20and%20a%20simple%20restart%20or%20sending%20the%20right%20signal%20can%20kick%20things%20back%20into%20place.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1854829940%22%20id%3D%22toc-hId-1854829940%22%3E%3CA%20id%3D%22inspect-cni-config%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%205%3A%20Inspect%20CNI%20network%20plugin%20configuration%3C%2FH2%3E%0A%3CP%3EAnother%20common%20source%20of%20problems%20that%20can%20cause%20containers%20to%20fail%20to%20start%20with%20errors%20such%20as%20%E2%80%9CFailedCreatePodSandbox%E2%80%9D%20is%20having%20a%20misconfigured%20CNI%20plugin%20and%2For%20config.%20This%20usually%20occurs%20whenever%20there%20are%20bugs%20or%20typos%20in%20the%20deployment%20scripts%20that%20are%20used%20to%20configure%20nodes%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F112990iDAD9903605C126E8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22failedpodcreatesandbox.png%22%20title%3D%22failedpodcreatesandbox.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EExample%20error%20due%20to%20misconfigured%20CNI%20config%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThankfully%2C%20the%20network%20configuration%20that%20is%20passed%20to%20CNI%20plugins%20in%20order%20to%20plumb%20networking%20into%20containers%20is%20a%20very%20simple%20static%20file%20that%20is%20easy%20to%20access.%20On%20Windows%2C%20this%20configuration%20file%20is%20stored%20under%20the%20%E2%80%9CC%3A%5Ck%5Ccni%5Cconfig%5C%E2%80%9D%20directory.%20On%20Linux%2C%20a%20similar%20file%20exists%20in%20%E2%80%9C%2Fetc%2Fcni%2Fnet.d%2F%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20the%20corresponding%20typo%20that%20caused%20pods%20to%20fail%20to%20start%20due%20to%20degraded%20networking%20state%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20437px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111273i9AA1CA00DDE7B303%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22invalid_cni_config_highlighted.png%22%20title%3D%22invalid_cni_config_highlighted.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EHighlighted%20Typo%20in%20CNI%20Config%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWhenever%20there%20are%20failing%20pod%20creations%20or%20unexpected%20network%20plumbing%2C%20we%20should%20always%20inspect%20the%20CNI%20config%20file%20for%20typos%20and%20consult%20the%20CNI%20plugins%20documentation%20for%20more%20details%20on%20what%20is%20expected.%20Here%20are%20the%20docs%20for%20the%20Windows%20plugins%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fcontainernetworking%2Fplugins%2Ftree%2Fmaster%2Fplugins%2Fmain%2Fwindows%2Fwin-bridge%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ewin-bridge%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fcontainernetworking%2Fplugins%2Ftree%2Fmaster%2Fplugins%2Fmain%2Fwindows%2Fwin-overlay%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ewin-overlay%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fcontainernetworking%2Fplugins%2Ftree%2Fmaster%2Fplugins%2Fmeta%2Fflannel%23windows-support-experimental%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eflannel%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--697327021%22%20id%3D%22toc-hId--697327021%22%3E%3CA%20id%3D%22verify-hns-networking%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%206%3A%20Verify%20HNS%20networking%20state%3C%2FH2%3E%0A%3CP%3EHaving%20exhaustively%20examined%20Kubernetes-specific%20event%20logs%20and%20configuration%20files%20previously%2C%20the%20next%20step%20usually%20consists%20of%20collecting%20network%20information%20programmed%20on%20the%20networking%20stack%20(control%20plane%20and%20data%20plane)%20used%20by%20containers.%20All%20of%20the%20information%20can%20be%20collected%20conveniently%20by%20the%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FSDN%2Fblob%2Fmaster%2FKubernetes%2Fwindows%2Fdebug%2Fcollectlogs.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ECollectLogs.ps1%3C%2FA%3E%E2%80%9D%20script%2C%20which%20will%20be%20done%20in%20step%207.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBefore%20reviewing%20the%20contents%20of%20the%20%E2%80%9CCollectLogs.ps1%E2%80%9D%20tool%2C%20the%20Windows%20container%20networking%20architecture%20needs%20to%20be%20understood%20at%20a%20high-level.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111274i2C8415404A94B48F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22k8s-windows.gif%22%20title%3D%22k8s-windows.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EWindows%20container%20networking%20Overview%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%20960px%3B%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3E%3CSTRONG%3EWindows%20Component%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3E%3CSTRONG%3EResponsibilities%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3E%3CSTRONG%3ELinux%20Counterpart%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3ENetwork%20Compartment%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CUL%3E%0A%3CLI%3ELogical%20separation%20in%20the%20TCP%2FIP%20stack.%3C%2FLI%3E%0A%3CLI%3EPacket%20forwarding%20between%20compartments%20is%20prevented%20(by%20default).%3C%2FLI%3E%0A%3CLI%3EAll%20IP%20objects%20(addresses%2C%20routes%2C%20etc.)%20stay%20unique%20to%20the%20compartment.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3ENetwork%20namespace%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3EvSwitch%20and%20HNS%20networks%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CUL%3E%0A%3CLI%3EProvides%20L2%20switching%20and%20L3%20functionality.%3C%2FLI%3E%0A%3CLI%3EEach%20vSwitch%20has%20its%20own%20forwarding%20table%20and%20forwards%20packets%20based%20on%20MAC%20address%20or%20VLAN%20tag.%3C%2FLI%3E%0A%3CLI%3EDynamically%20add%2Fremove%20switch%20ports.%3C%2FLI%3E%0A%3CLI%3E1%20(external)%20vSwitch%20%2F%20NIC.%3C%2FLI%3E%0A%3CLI%3E1%20vSwitch%20%2F%20HNS%20network.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3EBridge%20and%20IP%20routing%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3EvNICs%2C%20HNS%20endpoints%2C%20and%20vSwitch%20ports%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CUL%3E%0A%3CLI%3EContainer%20NICs%20(vNICs)%20are%20bound%20to%20a%20corresponding%20port%20in%20the%20vSwitch.%3C%2FLI%3E%0A%3CLI%3EEndpoints%20are%20a%20HNS%20abstraction%20for%20a%20container%20vNIC.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3EIP%20Links%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3EHNS%20policies%2C%20VFP%20rules%2C%20Firewall%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CUL%3E%0A%3CLI%3EVFP%20is%20the%20programmable%2C%20match-action%20based%20filtering%20engine.%3C%2FLI%3E%0A%3CLI%3EApplies%20rules%20to%20incoming%20outgoing%20packets%20from%20vPort.%3C%2FLI%3E%0A%3CLI%3EVFP%20rules%20are%20different%20for%20each%20vPort.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208%22%3E%3CP%3Eiptables%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20particular%20component%20to%20highlight%20is%20VFP%20(Virtual%20Filtering%20Platform)%2C%20which%20is%20a%20vSwitch%20extension%20containing%20most%20of%20the%20decision%20logic%20used%20to%20route%20packets%20correctly%20from%20source%20to%20destination%20by%20defining%20operations%20to%20be%20performed%20on%20packets%20such%20as%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EEncapsulating%2FDecapsulating%20packets%3C%2FLI%3E%0A%3CLI%3ELoad%20balancing%20packets%3C%2FLI%3E%0A%3CLI%3ENetwork%20Address%20Translation%3C%2FLI%3E%0A%3CLI%3ENetwork%20ACLs%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111276i4F289B701335A572%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22VFP_Overview.PNG%22%20title%3D%22VFP_Overview.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EOverview%20of%20Virtual%20Filtering%20Platform%20(VFP)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETo%20read%20up%20more%20on%20this%20topic%2C%20many%20more%20details%20on%20VFP%20can%20be%20found%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fresearch%2Fproject%2Fazure-virtual-filtering-platform%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOur%20first%20starting%20point%20should%20be%20to%20check%20that%20all%20the%20HNS%20resources%20indeed%20exist.%20Here%20is%20an%20example%20screenshot%20that%20shows%20the%20HNS%20networking%20state%20for%20a%20cluster%20with%20kube-DNS%20service%20(10.96.0.10)%20and%20a%20sample%20Windows%20web%20service%20(10.104.193.123)%20backed%20by%202%20endpoint%20DIPs%20(%22768b4bd1-774c-47e8-904f-91c007a4b183%22%2C%20%22048cd973-b5db-45a6-9c65-16dec22e871d%22)%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111277iA9F5E56BDED4DBE8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22hnsdiag_list_all%20-%20Copy.png%22%20title%3D%22hnsdiag_list_all%20-%20Copy.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ESummary%20of%20typical%20Host%20Networking%20Service%20(HNS)%20objects%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWe%20can%20take%20a%20closer%20look%20at%20the%20network%20object%20representing%20a%20given%20endpoint%20DIP%20using%20Get-HNS*%20cmdlets%20(this%20even%20works%20for%20remote%20endpoints!)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111278i413EB669C15C12BE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22get-hnsendpoint.png%22%20title%3D%22get-hnsendpoint.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ETypical%20HNS%20endpoint%20object%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20information%20listed%20here%20(DNSSuffix%2C%20IPAddress%2C%20Type%2C%20VirtualNetworkName%2C%20and%20Policies%20should%20match%20what%20was%20passed%20in%20through%20the%20CNI%20config%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDigging%20deeper%2C%20to%20view%20VFP%20rules%20we%20can%20use%20the%20inbox%20%E2%80%9Cvfpctrl%E2%80%9D%20cmdlet.%20For%20example%2C%20to%20view%20the%20layers%20of%20the%20endpoint%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20795px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111279i3A50451F50F46FAA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22vfp_layers.PNG%22%20title%3D%22vfp_layers.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EListing%20VFP%20layers%20for%20a%20given%20container%20vPort%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESimilarly%2C%20to%20print%20the%20rules%20belonging%20to%20a%20specific%20layer%20(e.g.%20SLB_NAT_LAYER)%20that%20each%20packet%20goes%20through%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111280i9893835D6F161611%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22vfp_rules1%20-%20Copy.png%22%20title%3D%22vfp_rules1%20-%20Copy.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ESnippet%20of%20VFP%20rules%20for%20the%20SLB_NAT_LAYER%20of%20a%20container%20vPort%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20information%20programmed%20into%20VFP%20should%20match%20with%20what%20was%20specified%20in%20the%20CNI%20config%20file%20and%20HNS%20Policies.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1045483314%22%20id%3D%22toc-hId-1045483314%22%3E%3CA%20id%3D%22analyze-collectlogs%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%207%3A%20Analyze%20snapshot%20of%20network%20using%20CollectLogs.ps1%3C%2FH2%3E%0A%3CP%3ENow%20that%20we%20familiarized%20ourselves%20with%20the%20state%20of%20the%20network%20and%20its%20basic%20constituents%20let%E2%80%99s%20take%20a%20look%20at%20some%20common%20symptoms%20and%20correlate%20it%20against%20the%20likely%20locations%20where%20the%20culprit%20may%20be.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOur%20tool%20of%20choice%20to%20take%20a%20snapshot%20of%20our%20network%20is%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FSDN%2Fblob%2Fmaster%2FKubernetes%2Fwindows%2Fdebug%2Fcollectlogs.ps1%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ECollectLogs.ps1%3C%2FA%3E.%20It%20collects%20the%20following%20information%20(amongst%20a%20few%20other%20things)%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%20960px%3B%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3E%3CSTRONG%3EFile%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3E%3CSTRONG%3EContains%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3Eendpoint.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3EEndpoint%20information%20and%20HNS%20Policies%20applied%20to%20endpoints.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3Eip.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3EAll%20NICs%20in%20all%20network%20compartments%20(and%20which)%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3Enetwork.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3EInformation%20about%20HNS%20networks%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3Epolicy.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3EInformation%20about%20HNS%20policies%20(e.g.%20VIP%20-%20%26gt%3B%20DIP%20Load%20Balancers)%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3Eports.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3EInformation%20about%20vSwitch%20(ports)%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3Eroutes.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3ERoute%20tables%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3Ehnsdiag.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3ESummary%20of%20all%20HNS%20resources%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3EvfpOutput.txt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22312%22%3E%3CP%3EVerbose%20dump%20of%20all%20the%20VFP%20ports%20used%20by%20containers%20listing%20all%20layers%20and%20associated%20rules%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1703187152%22%20id%3D%22toc-hId--1703187152%22%3E%3CFONT%20size%3D%225%22%3EExample%20%231%3A%20Inter-node%20communication%20Issues%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--156890322%22%20id%3D%22toc-hId--156890322%22%3EL2bridge%20%2F%20Flannel%20(host-gw)%3C%2FH4%3E%0A%3CP%3EWhen%20dealing%20with%20inter-node%20communication%20issues%20such%20as%20pod-to-pod%20connectivity%20across%20hosts%2C%20it%20is%20important%20to%20check%20static%20routes%20are%20programmed.%20This%20can%20be%20achieved%20by%20inspecting%20the%20routes.txt%20or%20using%20Get-NetRoute%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111281iDF2559D557EEC4DE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22l2bridgeRoutes%20-%20internode.png%22%20title%3D%22l2bridgeRoutes%20-%20internode.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EGet-NetRoute%20output%20highlighting%20static%20routes%20for%20pod%20networks%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThere%20should%20be%20routes%20programmed%20for%20each%20pod%20subnet%20(e.g.%2010.244.18.0%2F24)%20%3D%26gt%3B%20container%20host%20IP%20(e.g.%2010.127.130.35).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20using%20Flannel%2C%20users%20can%20also%20consult%20the%20FlannelD%20output%20to%20watch%20for%20the%20appropriate%20events%20for%20adding%20the%20pod%20subnets%20after%20launch%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20752px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111283iBF77A61E18E94618%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22flannel_subnets.PNG%22%20title%3D%22flannel_subnets.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFlannel%20%22subnet%20lease%22%20events%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--729679130%22%20id%3D%22toc-hId--729679130%22%3E%3CFONT%20size%3D%224%22%3EOverlay%20(Flannel%20vxlan)%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FH4%3E%0A%3CP%3EIn%20overlay%2C%20inter-node%20connectivity%20is%20implemented%20using%20%22REMOTESUBNETROUTE%22%20rules%20in%20VFP.%20Instead%20of%20checking%20static%20routes%2C%20we%20can%20reference%20%22REMOTESUBNETROUTE%22%20rules%20directly%20in%20vfpoutput.txt%2C%20where%20each%20pod%20subnet%20(e.g.%2010.244.2.0%2F24)%20assigned%20to%20a%20node%20should%20have%20its%20corresponding%20destination%20IP%20(e.g.%2010.127.130.38)%20specified%20as%20the%20destination%20in%20the%20outer%20packet%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20869px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111286iA9CD54FE2E1F019A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22remotesubnet%20-%20highlighted.PNG%22%20title%3D%22remotesubnet%20-%20highlighted.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EVFP%20RemoteSubnetRoute%20rules%20used%20for%20VXLAN%20packet%20encapsulation%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFor%20additional%20details%20on%20inter-node%20container%20to%20container%20connectivity%20in%20overlay%2C%20please%20take%20a%20look%20at%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqY_84rrYYYY%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20video%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1013131205%22%20id%3D%22toc-hId-1013131205%22%3E%3CFONT%20size%3D%224%22%3EWhen%20can%20I%20encounter%20this%20issue%3F%3C%2FFONT%3E%3C%2FH4%3E%0A%3CP%3EOne%20common%20configuration%20problem%20that%20manifests%20in%20this%20symptom%20is%20having%20mismatched%20networking%20configuration%20on%20Linux%2FWindows.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20double-check%20the%20network%20configuration%20on%20Linux%2C%20users%20can%20consult%20the%20CNI%20config%20file%20stored%20in%20%2Fetc%2Fcni%2Fnet.d%2F.%20In%20the%20case%20of%20Flannel%20on%20Linux%2C%20this%20file%20can%20also%20be%20embedded%20into%20the%20container%2C%20so%20users%20may%20need%20to%20exec%20into%20the%20Flannel%20pod%20itself%20to%20access%20it%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Ekubectl%20exec%20-n%20kube-system%20kube-flannel-ds-amd64-%26lt%3Bsomeid%26gt%3B%20cat%20%2Fetc%2Fkube-flannel%2Fnet-conf.json%0Akubectl%20exec%20-n%20kube-system%20kube-flannel-ds-amd64-%26lt%3Bsomeid%26gt%3B%20cat%20%2Fetc%2Fkube-flannel%2Fcni-conf.json%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-257925603%22%20id%3D%22toc-hId-257925603%22%3E%3CFONT%20size%3D%225%22%3EExample%20%232%3A%20Containers%20cannot%20reach%20the%20outside%20world%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3EWhenever%20outbound%20connectivity%20does%20not%20work%2C%20one%20of%20the%20first%20starting%20points%20is%20to%20ensure%20that%20there%20exists%20a%20NIC%20in%20the%20container.%20For%20this%2C%20we%20can%20consult%20the%20%E2%80%9Cip.txt%E2%80%9D%20output%20and%20compare%20it%20with%20the%20output%20of%20an%20%E2%80%9Cdocker%20exec%20%3CID%3E%20ipconfig%20%2Fall%E2%80%9D%20in%20the%20problematic%20(running)%20container%20itself%3A%3C%2FID%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20776px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111285i15070A4881B4280D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ipconfig.PNG%22%20title%3D%22ipconfig.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EReference%20Container%20NIC%20in%20network%20compartment%202%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20l2bridge%20networking%20(used%20by%20Flannel%20host-gw%20backend)%2C%20the%20container%20gateway%20should%20be%20set%20to%20the%202.%20address%20exclusively%20reserved%20for%20the%20bridge%20endpoint%20(cbr0_ep)%20in%20the%20same%20pod%20subnet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20overlay%20networking%20(used%20by%20Flannel%20vxlan%20backend)%2C%20the%20container%20gateway%20should%20be%20set%20to%20the%20.1%20address%20exclusively%20reserved%20for%20the%20DR%20(distributed%20router)%20vNIC%20in%20the%20same%20pod%20subnet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-203784579%22%20id%3D%22toc-hId-203784579%22%3E%3CFONT%20size%3D%224%22%3EL2bridge%3C%2FFONT%3E%3C%2FH4%3E%0A%3CP%3EGoing%20outside%20of%20the%20container%2C%20on%20l2bridge%20one%20should%20also%20verify%20that%20the%20route%20tables%20on%20the%20node%20itself%20are%20setup%20correctly%20for%20the%20bridge%20endpoint.%20Here%20is%20a%20sample%20with%20the%20relevant%20entries%20containing%20quad-zero%20routes%20for%20a%20node%20with%20pod%20subnet%2010.244.19.0%2F24%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111287i2FA49F4E43D1D2F4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22l2bridgeRoutes%20-%20cbr0ep.png%22%20title%3D%22l2bridgeRoutes%20-%20cbr0ep.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EQuad-zero%20static%20routes%20for%20a%20node%20with%20pod%20subnet%2010.244.19.0%2F24%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20next%20thing%20to%20check%20on%20l2bridge%20is%20verify%20that%20the%20OutboundNAT%20policy%20and%20the%20ExceptionList%20is%20programmed%20correctly.%20For%20a%20given%20endpoint%20(e.g.%2010.244.4.7)%20we%20should%20verify%20in%20the%20endpoint.txt%20that%20there%20exists%20an%20OutboundNAT%20HNS%20Policy%20and%20that%20the%20ExceptionList%20matches%20with%20what%20we%20entered%20into%20the%20deployment%20scripts%20originally%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20700px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111288i5562210974D8BE26%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22endpoint-highlighted.png%22%20title%3D%22endpoint-highlighted.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EHNS%20Policies%20for%20a%20typical%20l2bridge%20endpoint%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFinally%2C%20we%20can%20also%20consult%20the%20vfpOutput.txt%20to%20verify%20that%20the%20L2Rewrite%20rule%20exists%20so%20that%20the%20container%20MAC%20is%20rewritten%20to%20the%20host%E2%80%99s%20MAC%20as%20specified%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvirtualization%2Fwindowscontainers%2Fcontainer-networking%2Fnetwork-drivers-topologies%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3El2bridge%20container%20networking%20docs%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20EXTERNAL_L2_REWRITE%20layer%2C%20there%20should%20be%20a%20rule%20which%20matches%20the%20container%E2%80%99s%20source%20MAC%20(e.g.%20%2200-15-5D-AA-87-B8%22)%20and%20rewrites%20it%20to%20match%20the%20host%E2%80%99s%20MAC%20address%20(e.g.%20%2200-15-5D-05-C3-0C%22)%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20462px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111289iC24422731726779A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22l2bridge_rule.png%22%20title%3D%22l2bridge_rule.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EReference%20EXTERNAL_L2_REWRITE_LAYER%20with%20rules%20transposing%20a%20container%20MAC%20to%20a%20host%20MAC%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1946594914%22%20id%3D%22toc-hId-1946594914%22%3EOverlay%3C%2FH4%3E%0A%3CP%3EFor%20overlay%2C%20we%20can%20check%20whether%20there%20exists%20an%20ENCAP%20rule%20that%20encapsulates%20outgoing%20packets%20correctly%20with%20the%20hosts%20IP.%20For%20example%2C%20for%20a%20given%20pod%20subnet%20(10.244.3.0%2F24)%20with%20host%20IP%2010.127.130.36%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20471px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111291i62161B345775A6EE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22encap_overlay_highlighted.png%22%20title%3D%22encap_overlay_highlighted.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EReference%20encapsulation%20rule%20used%20by%20overlay%20container%20networks%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--605562047%22%20id%3D%22toc-hId--605562047%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20id%3D%22toc-hId-1137248288%22%20id%3D%22toc-hId-1137248288%22%3EWhen%20can%20I%20encounter%20this%20issue%3F%3C%2FH4%3E%0A%3CP%3EOne%20example%20configuration%20error%20for%20Flannel%20(vxlan)%20overlay%20that%20may%20results%20in%20failing%20east%2Fwest%20connectivity%20is%20failing%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvirtualization%2Fwindowscontainers%2Fkubernetes%2Fcommon-problems%23on-flannel-vxlan-mode-my-pods-are-having-connectivity-issues-after-rejoining-the-node%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Edelete%20the%20old%20SourceVIP.json%3C%2FA%3E%20file%20whenever%20the%20same%20node%20is%20deleted%20and%20re-joined%20to%20a%20cluster.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3ENOTE%3A%20When%20deploying%20L2bridge%20networks%20on%20Azure%2C%20user%E2%80%99s%20also%20need%20to%20configure%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Ftutorial-create-route-table-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Euser-defined%20routes%3C%2FA%3E%20for%20each%20pod%20subnet%20allocated%20to%20a%20node%20for%20networking%20to%20work.%20Some%20users%20opt%20to%20use%20overlay%20in%20public%20cloud%20environments%20for%20that%20reason%20instead%2C%20where%20this%20step%20isn%E2%80%99t%20needed.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-382042686%22%20id%3D%22toc-hId-382042686%22%3E%3CFONT%20size%3D%225%22%3EExample%20%233%3A%20Services%20%2F%20Load-balancing%20does%20not%20work%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3ELet%E2%80%99s%20say%20we%20have%20created%20a%20Kubernetes%20service%20called%20%E2%80%9Cwin-webserver%E2%80%9D%20with%20VIP%2010.102.220.146%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111292iE056F0991730E5A2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22services_example.PNG%22%20title%3D%22services_example.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EExample%20Kubernetes%20service%20on%20Windows%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ELoad%20Balancing%20is%20usually%20performed%20directly%20on%20the%20node%20itself%20by%20replacing%20the%20destination%20VIP%20(Service%20IP)%20with%20a%20specified%20DIP%20(pod%20IP).%20HNS%20Loadbalancers%20can%20be%20viewed%20using%20the%20%E2%80%9Chnsdiag%E2%80%9D%20cmdlet%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111293i7B6DB2469ED96695%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22loadbalancing_annotated.png%22%20title%3D%22loadbalancing_annotated.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ETypical%20HNS%20Loadbalancer%20objects%20on%20Windows%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFor%20a%20more%20verbose%20output%2C%20users%20can%20also%20inspect%20policy.txt%20to%20check%20for%20%E2%80%9CELB%E2%80%9D%20policies%20(LoadBalancers)%20for%20additional%20information%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20620px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111295i9899B4FC0287B0F9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22loadbalancers_detailed.PNG%22%20title%3D%22loadbalancers_detailed.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EExample%20HNS%20LoadBalancer%20configuration%20in%20policy.txt%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20next%20step%20usually%20consists%20of%20verifying%20that%20the%20endpoints%20(e.g.%20%224d1d1b8c-c12d-461a-a608-11825b6a9189%22)%20still%20exist%20in%20endpoint.txt%20and%20are%20reachable%20by%20IP%20from%20the%20same%20source%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20711px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111296i446AC7CDAF4A2DCA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22dip.PNG%22%20title%3D%22dip.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EExample%20pod%20DIP%20endpoint%20referenced%20by%20a%20HNS%20Loadbalancer%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFinally%2C%20we%20can%20also%20check%20whether%20the%20VFP%20%22lbnat%22%20rules%20exist%20in%20the%20%22LB%22%20layer%20for%20our%20service%20IP%2010.102.220.146%20(with%20NodePort%2031486)%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20574px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111297i25625ED0CA900FE1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22lbnat-highlighted.png%22%20title%3D%22lbnat-highlighted.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EReference%20VFP%20rules%20used%20for%20load-balancing%20containers%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-327901662%22%20id%3D%22toc-hId-327901662%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20id%3D%22toc-hId-2070711997%22%20id%3D%22toc-hId-2070711997%22%3EWhen%20can%20I%20encounter%20this%20issue%3F%3C%2FH4%3E%0A%3CP%3EOne%20possible%20issue%20that%20can%20cause%20erroneous%20load%20balancing%20is%20a%20misconfigured%20kube-proxy%20which%20is%20responsible%20for%20programming%20these%20policies.%20For%20example%2C%20one%20may%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvirtualization%2Fwindowscontainers%2Fkubernetes%2Fcommon-problems%23after-some-time-vnics-and-hns-endpoints-of-containers-are-being-deleted%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Efail%20to%20pass%20in%20the%20--hostname-override%20parameter%3C%2FA%3E%2C%20causing%20endpoints%20from%20the%20local%20host%20to%20be%20deleted.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3ENOTE%20that%20service%20VIP%20resolution%20from%20the%20Windows%20node%20itself%20is%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvirtualization%2Fwindowscontainers%2Fkubernetes%2Fcommon-problems%23my-windows-node-cannot-access-my-services-using-the-service-ip%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Enot%20supported%3C%2FA%3E%20on%20Windows%20Server%202019%2C%20but%20planned%20for%20Windows%20Server%2C%20version%201903.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CH3%20id%3D%22toc-hId--740182234%22%20id%3D%22toc-hId--740182234%22%3E%3CFONT%20size%3D%225%22%3EExample%20%234%3A%20DNS%20resolution%20is%20not%20working%20from%20within%20the%20container%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3EFor%20this%20example%2C%20let%E2%80%99s%20assume%20that%20the%20kube-DNS%20cluster%20addon%20is%20configured%20with%20service%20IP%2010.96.0.10.%3C%2FP%3E%0A%3CP%3EFailing%20DNS%20resolution%20is%20often%20a%20symptom%20of%20one%20of%20the%20previous%20examples.%20For%20example%2C%20(external)%20DNS%20resolution%20would%20fail%20if%20outbound%20connectivity%20isn%E2%80%99t%20present%20or%20resolution%20could%20also%20fail%20if%20we%20cannot%20reach%20the%20kube-DNS%20service.%3C%2FP%3E%0A%3CP%3EThus%2C%20the%20first%20troubleshooting%20step%20should%20be%20to%20analyze%20whether%20the%20kube-DNS%20service%20(e.g.%2010.96.0.10)%20is%20programmed%20as%20a%20HNS%20LoadBalancer%20correctly%20on%20the%20problematic%20node%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20616px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111298i3953773018E7F565%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22DNS_loadbalancer.png%22%20title%3D%22DNS_loadbalancer.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EHNS%20LoadBalancer%20object%20representing%20kube-DNS%20service%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENext%2C%20we%20should%20also%20check%20whether%20the%20DNS%20information%20is%20set%20correctly%20in%20the%20ip.txt%20entry%20for%20the%20container%20NIC%20itself%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20786px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111299iE86B172A18571034%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22dns-info-highlighted.png%22%20title%3D%22dns-info-highlighted.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EReference%20DNS%20configuration%20in%20a%20Windows%20pod%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWe%20should%20also%20check%20whether%20it%E2%80%99s%20possible%20to%20reach%20the%20kube-DNS%20pods%20directly%20and%20whether%20that%20works.%20This%20may%20indicate%20that%20there%20is%20some%20problem%20in%20resolving%20the%20DNS%20service%20VIP%20itself.%20For%20example%2C%20assuming%20that%20one%20of%20the%20DNS%20pods%20has%20IP%2010.244.0.3%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111300i45EBCBB9C5463443%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22dns-dip.PNG%22%20title%3D%22dns-dip.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ESending%20a%20DNS%20request%20directly%20to%20the%20DNS%20pod%20endpoint%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--794323258%22%20id%3D%22toc-hId--794323258%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20id%3D%22toc-hId-948487077%22%20id%3D%22toc-hId-948487077%22%3EWhen%20can%20I%20encounter%20this%20issue%3F%3C%2FH4%3E%0A%3CP%3EOne%20possible%20misconfiguration%20that%20results%20in%20DNS%20resolution%20problems%20is%20an%20incorrect%20DNS%20suffix%20or%20DNS%20service%20IP%20which%20was%20specified%20in%20the%20CNI%20config%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FSDN%2Fblob%2Fmaster%2FKubernetes%2Fflannel%2Fl2bridge%2Fcni%2Fconfig%2Fcni.conf%23L9%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FSDN%2Fblob%2Fmaster%2FKubernetes%2Fflannel%2Fl2bridge%2Fcni%2Fconfig%2Fcni.conf%23L12%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1990232834%22%20id%3D%22toc-hId-1990232834%22%3E%3CA%20id%3D%22capture-packets%22%20target%3D%22_blank%22%3E%3C%2FA%3EStep%208%3A%20Capture%20packets%20and%20analyze%20flows%3C%2FH2%3E%0A%3CP%3EThe%20last%20step%20requires%20in-depth%20knowledge%20of%20the%20operations%20that%20packets%20from%20containers%20undergo%20and%20the%20network%20flow.%20As%20such%2C%20it%20is%20also%20the%20most%20time-consuming%20to%20perform%20and%20will%20vary%20depending%20on%20the%20observed%20issue.%20At%20a%20high%20level%2C%20it%20consists%20of%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ERunning%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FSDN%2Fblob%2Fmaster%2FKubernetes%2Fwindows%2Fdebug%2Fstartpacketcapture.cmd%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Estartpacketcapture%3C%2FA%3E%20to%20start%20the%20trace%3C%2FLI%3E%0A%3CLI%3EReproducing%20the%20issue%20%E2%80%93%20e.g.%20sending%20packets%20from%20source%20to%20destination%3C%2FLI%3E%0A%3CLI%3ERunning%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FSDN%2Fblob%2Fmaster%2FKubernetes%2Fwindows%2Fdebug%2Fstoppacketcapture.cmd%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Estoppacketcapture%3C%2FA%3E%20to%20stop%20the%20trace%3C%2FLI%3E%0A%3CLI%3EAnalyzing%20correct%20processing%20by%20the%20data%20path%20at%20each%20step%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20are%20a%20few%20example%20animations%20that%20showcase%20some%20common%20container%20network%20traffic%20flows%3A%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1936091810%22%20id%3D%22toc-hId-1936091810%22%3EPod%20to%20Pod%3A%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111301i67449EE494FF87CE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22pod2pod.gif%22%20title%3D%22pod2pod.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20visualization%20showing%20pod%20to%20pod%20connectivity%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--616065151%22%20id%3D%22toc-hId--616065151%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-1126745184%22%20id%3D%22toc-hId-1126745184%22%3EPod%20to%20Internet%3A%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--1425411777%22%20id%3D%22toc-hId--1425411777%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111302iBACC612A7FD1A427%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22pod_outbound.gif%22%20title%3D%22pod_outbound.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20visualization%20showing%20pod%20to%20outbound%20connectivity%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-317398558%22%20id%3D%22toc-hId-317398558%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-2060208893%22%20id%3D%22toc-hId-2060208893%22%3EPod%20to%20Service%3A%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111304i479D28762FEEB2E3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22pod-serviceVIP.gif%22%20title%3D%22pod-serviceVIP.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20visualization%20showing%20pod%20to%20service%20connectivity%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EShowing%20how%20to%20analyze%20and%20debug%20these%20packet%20captures%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewill%20be%20done%20in%20the%20next%20part(s)%20of%20this%20blog%20post%20series%20through%20scenario-driven%20videos%20showing%20packet%20captures%20for%20supported%20networking%20flows%20on%20Windows.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20a%20quick%20teaser%2C%20here%20is%20a%20video%20recording%20taken%20at%20KubeCon%20that%20shows%20debugging%20an%20issue%20live%20using%20startpacketcapture.cmd%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtTZFoiLObX4%26amp%3Bt%3D1733%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtTZFoiLObX4%26amp%3Bt%3D1733%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--750685338%22%20id%3D%22toc-hId--750685338%22%3ESummary%3C%2FH2%3E%0A%3CP%3EWe%20looked%20at%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAutomated%20scripts%20that%20can%20be%20used%20to%20verify%20basic%20connectivity%20and%20correct%20installation%20of%20Kubernetes%3C%2FLI%3E%0A%3CLI%3EHNS%20networking%20objects%20and%20VFP%20rules%20used%20to%20network%20containers%3C%2FLI%3E%0A%3CLI%3EHow%20to%20query%20event%20logs%20from%20different%20Kubernetes%20components%3C%2FLI%3E%0A%3CLI%3EHow%20to%20analyze%20the%20control%20path%20at%20a%20high%20level%20for%20common%20configuration%20errors%20using%20CollectLogs.ps1%3C%2FLI%3E%0A%3CLI%3ETypical%20network%20packet%20flows%20for%20common%20connectivity%20scenarios%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EPerforming%20the%20above%20steps%20can%20go%20a%20great%20length%20towards%20understanding%20the%20underlying%20issue%20for%20an%20observed%20symptom%2C%20improve%20efficacy%20when%20it%20comes%20to%20implementing%20workarounds%2C%20and%20accelerate%20the%20speed%20at%20which%20fixes%20are%20implemented%20by%20others%2C%20having%20already%20performed%20the%20initial%20investigation%20work.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-992124997%22%20id%3D%22toc-hId-992124997%22%3EWhat%E2%80%99s%20next%3F%3C%2FH2%3E%0A%3CP%3EIn%20the%20future%2C%20we%20will%20go%20over%20supported%20connectivity%20scenarios%20and%20specific%20steps%20on%20how%20to%20troubleshoot%20each%20one%20of%20them%20in-depth.%20These%20will%20build%20on%20top%20of%20the%20materials%20presented%20here%20but%20also%20contain%20videos%20analyzing%20packet%20captures%2C%20data-path%20analysis%20as%20well%20as%20other%20traces%20(e.g.%20HNS%20tracing).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1560031964%22%20id%3D%22toc-hId--1560031964%22%3EWe%20are%20looking%20for%20your%20feedback!%3C%2FH2%3E%0A%3CP%3ELast%20but%20not%20least%2C%20the%20Windows%20container%20networking%20team%20needs%20your%20feedback!%20What%20would%20you%20like%20to%20see%20next%20for%20container%20networking%20on%20Windows%3F%20Which%20bugs%20are%20preventing%20you%20from%20realizing%20your%20goals%3F%20Share%20your%20voice%20in%20the%20comments%20below%2C%20or%20fill%20out%20the%20following%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fcontainernet2019%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esurvey%3C%2FA%3E%20and%20influence%20our%20future%20investments!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20reading%2C%3C%2FP%3E%0A%3CP%3EDavid%20Schott%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E*Special%20thanks%20to%20Dinesh%20Kumar%20Govindasamy%20(Microsoft)%20for%20his%20fantastic%20work%20creating%20%26amp%3B%20presenting%20many%20of%20the%20materials%20used%20as%20a%20basis%20for%20this%20blog%20at%20KubeCon%20Shanghai%20'18!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-508648%22%20slang%3D%22en-US%22%3E%3CP%3EKubernetes%20is%20not%20easy%20to%20troubleshoot%20%E2%80%93%20even%20if%20you%E2%80%99re%20an%20expert.%20There%20are%20multiple%20components%20involved%20in%20the%20creation%2Fdeletion%20of%20containers%20that%20must%20all%20harmoniously%20interoperate%20end-to-end.%20Read%20on%20to%20find%20out%20what%20they%20are%20and%20how%20to%20verify%20they%20are%20configured%20correctly!%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

We’ve all been there: Sometimes things just don’t work the way they should even though we followed everything down to a T.

 

giphy

 

Kubernetes in particular, is not easy to troubleshoot – even if you’re an expert. There are multiple components involved in the creation/deletion of containers that must all harmoniously interoperate end-to-end. For example:

  • Inbox platform services (e.g. WinNAT, HNS/HCS, VFP)
  • Container runtimes & Go-wrappers (e.g. Dockershim, ContainerD, hcsshim) 
  • Container orchestrator processes (e.g. kube-proxy, kubelet) 
  • CNI network plugins (e.g. win-bridge, win-overlay, azure-cni) 
  • IPAM plugins (e.g. host-local)
  • Any other host-agent processes/daemons (e.g. FlannelD, Calico-Felix, etc.) 
  • … (more to come!)

 

This, in turn, also means that the potential problem space to investigate can grow overwhelmingly large when things do end up breaking, manifesting in sentiments such as “I don’t even know where to begin.”

 

The intent of this blog post is to educate the reader on the available tools and resources that can help unpeel the first few layers of the onion; it is not intended to be a fully exhaustive guide to root-cause every possible bug for every possible configuration. However, by the end one should at least be able to narrow down on an observable symptom through a pipeline of analytical troubleshooting steps and come out with a better understanding of what the underlying issue could be.

 

NOTE: Most of the content in this blog is directly taken from the amazing Kubecon Shanghai ’18 video “Understanding Windows Container Networking in Kubernetes Using a Real Story”  by Cindy Xing (Huawei) and Dinesh Kumar Govindasamy (Microsoft).

 

Table of Contents

  1. Ensure Kubernetes is installed and running correctly
  2. Use a script to validate basic cluster connectivity
  3. Query the built-in Kubernetes event logs
  4. Analyze kubelet, kube-proxy logs
  5. Inspect CNI network plugin configuration
  6. Verify HNS networking state
  7. Take a snapshot of your network using CollectLogs.ps1
  8. Capture packets and analyze network flows

 

Step 1: Ensure Kubernetes is installed and running correctly

As mentioned in the introduction, there are a lot of different platform and open-source actors that are needed to operate a Kubernetes cluster. It can be hard to keep track of all of them - especially given that they release at a different cadence.

 

One quick sanity-check that can be done without any external help is to employ a validation script that verifies supported bits are installed:

 

verify_installation.pngVerifying Kubernetes is installed

 

While deceivingly obvious, another step that can be equally easily overlooked is ensuring that all the components are indeed running. Any piece of software can crash or enter a deadlock state, including host-agent processes such as kubelet.exe or kube-proxy.exe. This can result in unexpected cluster behavior and detached node/container states, but thankfully it’s easy to check. Running a simple ps command usually suffices:

 

ps.pngTypical Kubernetes processes running

Unfortunately, the above command won’t capture that the processes themselves could be stuck waiting in a deadlock-like state; we will cover this case briefly in step 4.

 

Step 2: Use a script to validate basic cluster connectivity

Before diving head-first into analyzing HNS resources and verbose logs, there is a handy Pester test suite which allows you to validate basic connectivity scenarios and report on success/failure here. The only pre-requisite in order to run it is that you are using Windows Server 2019  (requires minor fix-up otherwise) and that you have more than one node for the remote pod test:

 

K8s_pester_tests.PNGSnippet from Kubernetes Connectivity Test Suite

The intent of running this script is to have a quick glance of overall networking health, as well as hopefully accelerate subsequent steps by knowing what to look for.

 

Step 3: Query the built-in Kubernetes event logs

After verifying that all the processes are running as expected, the next step is to query the built-in Kubernetes event logs and see what the basic built-in health-checks that ship with K8s have to say:

 

kubectl_get_pods.pngKubernetes pods that are stuck in "ContainerCreating" state

 

More Information about misbehaving Kubernetes resources such as event logs can be viewed using the “kubectl describe” command. For example, one frequent misconfiguration on Windows is having a misconfigured “pause” container with a kernel version that doesn’t match the host OS:

 

pause_container.gifShared pause container vNIC in a pod

 

Here are the corresponding event logs from kubectl describe output, where we accidentally built our “kubeletwin/pause” image on top of a Windows Server, version 1803 container image and ran it on a Windows Server 2019 host:

 

eventlogs - highlighted.pngErroneous Kubernetes event logs

(On a side note, this specific example issue can be avoided altogether if one references the  multi-arch pause container image mcr.microsoft.com/k8s/core/pause:1.0.0 which will run on both Windows Server, version 1803 and Windows Server 2019).

 

Step 4: Analyze kubelet, kube-proxy logs

Another useful source of information that can be leveraged to perform root-cause analysis for failing container creations is the kubelet, FlannelD, and kube-proxy logs.

 

These components all have different responsibilities. Here is a very brief summary of what they do which should give you a rough idea on what to watch out for:

 

Component

Responsibility

When to inspect?

Kubelet

Interacts with container runtime (e.g. Dockershim) to bring up containers and pods.

Erroneous pod creations/configurations

Kube-proxy

Manages network connectivity for containers (programming policies used for NAT’ing or load balancing).

Mysterious network glitches, in particular for service discovery and communication

FlannelD

Responsible for keeping all the nodes in sync with the rest of the cluster for events such as node removal/addition. This consists of assigning IP blocks (pod subnets) to nodes as well as plumbing routes for inter-node connectivity.

Failing inter-node connectivity

 

Log files for all of these components can be found in different locations; by default a log dump for kubelet and kube-proxy is generated in the C:\k directory, though some users opt to log to a different directory.

 

If the logs appear to not have updated in a longer time, then perhaps the process is stuck, and a simple restart or sending the right signal can kick things back into place.

 

Step 5: Inspect CNI network plugin configuration

Another common source of problems that can cause containers to fail to start with errors such as “FailedCreatePodSandbox” is having a misconfigured CNI plugin and/or config. This usually occurs whenever there are bugs or typos in the deployment scripts that are used to configure nodes:

 

failedpodcreatesandbox.pngExample error due to misconfigured CNI config

Thankfully, the network configuration that is passed to CNI plugins in order to plumb networking into containers is a very simple static file that is easy to access. On Windows, this configuration file is stored under the “C:\k\cni\config\” directory. On Linux, a similar file exists in “/etc/cni/net.d/”.

 

Here is the corresponding typo that caused pods to fail to start due to degraded networking state:

 

 

invalid_cni_config_highlighted.pngHighlighted Typo in CNI Config

Whenever there are failing pod creations or unexpected network plumbing, we should always inspect the CNI config file for typos and consult the CNI plugins documentation for more details on what is expected. Here are the docs for the Windows plugins:

 

Step 6: Verify HNS networking state

Having exhaustively examined Kubernetes-specific event logs and configuration files previously, the next step usually consists of collecting network information programmed on the networking stack (control plane and data plane) used by containers. All of the information can be collected conveniently by the “CollectLogs.ps1” script, which will be done in step 7.

 

Before reviewing the contents of the “CollectLogs.ps1” tool, the Windows container networking architecture needs to be understood at a high-level.

 

k8s-windows.gifWindows container networking Overview

 

Windows Component

Responsibilities

Linux Counterpart

Network Compartment

  • Logical separation in the TCP/IP stack.
  • Packet forwarding between compartments is prevented (by default).
  • All IP objects (addresses, routes, etc.) stay unique to the compartment.

Network namespace

vSwitch and HNS networks

  • Provides L2 switching and L3 functionality.
  • Each vSwitch has its own forwarding table and forwards packets based on MAC address or VLAN tag.
  • Dynamically add/remove switch ports.
  • 1 (external) vSwitch / NIC.
  • 1 vSwitch / HNS network.

Bridge and IP routing

vNICs, HNS endpoints, and vSwitch ports

  • Container NICs (vNICs) are bound to a corresponding port in the vSwitch.
  • Endpoints are a HNS abstraction for a container vNIC.

IP Links

HNS policies, VFP rules, Firewall

  • VFP is the programmable, match-action based filtering engine.
  • Applies rules to incoming outgoing packets from vPort.
  • VFP rules are different for each vPort.

iptables

 

One particular component to highlight is VFP (Virtual Filtering Platform), which is a vSwitch extension containing most of the decision logic used to route packets correctly from source to destination by defining operations to be performed on packets such as:

  • Encapsulating/Decapsulating packets
  • Load balancing packets
  • Network Address Translation
  • Network ACLs

VFP_Overview.PNGOverview of Virtual Filtering Platform (VFP)

To read up more on this topic, many more details on VFP can be found here.

 

Our first starting point should be to check that all the HNS resources indeed exist. Here is an example screenshot that shows the HNS networking state for a cluster with kube-DNS service (10.96.0.10) and a sample Windows web service (10.104.193.123) backed by 2 endpoint DIPs ("768b4bd1-774c-47e8-904f-91c007a4b183", "048cd973-b5db-45a6-9c65-16dec22e871d"):

 

hnsdiag_list_all - Copy.pngSummary of typical Host Networking Service (HNS) objects

We can take a closer look at the network object representing a given endpoint DIP using Get-HNS* cmdlets (this even works for remote endpoints!)

 

get-hnsendpoint.pngTypical HNS endpoint object

The information listed here (DNSSuffix, IPAddress, Type, VirtualNetworkName, and Policies should match what was passed in through the CNI config file.

 

Digging deeper, to view VFP rules we can use the inbox “vfpctrl” cmdlet. For example, to view the layers of the endpoint:

 

vfp_layers.PNGListing VFP layers for a given container vPort

Similarly, to print the rules belonging to a specific layer (e.g. SLB_NAT_LAYER) that each packet goes through:

 

vfp_rules1 - Copy.pngSnippet of VFP rules for the SLB_NAT_LAYER of a container vPort

The information programmed into VFP should match with what was specified in the CNI config file and HNS Policies.

 

Step 7: Analyze snapshot of network using CollectLogs.ps1

Now that we familiarized ourselves with the state of the network and its basic constituents let’s take a look at some common symptoms and correlate it against the likely locations where the culprit may be.

 

Our tool of choice to take a snapshot of our network is CollectLogs.ps1. It collects the following information (amongst a few other things):

File

Contains

endpoint.txt

Endpoint information and HNS Policies applied to endpoints.

ip.txt

All NICs in all network compartments (and which)

network.txt

Information about HNS networks

policy.txt

Information about HNS policies (e.g. VIP - > DIP Load Balancers)

ports.txt

Information about vSwitch (ports)

routes.txt

Route tables

hnsdiag.txt

Summary of all HNS resources

vfpOutput.txt

Verbose dump of all the VFP ports used by containers listing all layers and associated rules

 

Example #1: Inter-node communication Issues

 

L2bridge / Flannel (host-gw)

When dealing with inter-node communication issues such as pod-to-pod connectivity across hosts, it is important to check static routes are programmed. This can be achieved by inspecting the routes.txt or using Get-NetRoute:

 

l2bridgeRoutes - internode.pngGet-NetRoute output highlighting static routes for pod networks

There should be routes programmed for each pod subnet (e.g. 10.244.18.0/24) => container host IP (e.g. 10.127.130.35).

 

When using Flannel, users can also consult the FlannelD output to watch for the appropriate events for adding the pod subnets after launch:

 

flannel_subnets.PNGFlannel "subnet lease" events

Overlay (Flannel vxlan)

In overlay, inter-node connectivity is implemented using "REMOTESUBNETROUTE" rules in VFP. Instead of checking static routes, we can reference "REMOTESUBNETROUTE" rules directly in vfpoutput.txt, where each pod subnet (e.g. 10.244.2.0/24) assigned to a node should have its corresponding destination IP (e.g. 10.127.130.38) specified as the destination in the outer packet:

 

remotesubnet - highlighted.PNGVFP RemoteSubnetRoute rules used for VXLAN packet encapsulation

For additional details on inter-node container to container connectivity in overlay, please take a look at this video.

 

When can I encounter this issue?

One common configuration problem that manifests in this symptom is having mismatched networking configuration on Linux/Windows.

 

To double-check the network configuration on Linux, users can consult the CNI config file stored in /etc/cni/net.d/. In the case of Flannel on Linux, this file can also be embedded into the container, so users may need to exec into the Flannel pod itself to access it:

 

kubectl exec -n kube-system kube-flannel-ds-amd64-<someid> cat /etc/kube-flannel/net-conf.json
kubectl exec -n kube-system kube-flannel-ds-amd64-<someid> cat /etc/kube-flannel/cni-conf.json

 

Example #2: Containers cannot reach the outside world

Whenever outbound connectivity does not work, one of the first starting points is to ensure that there exists a NIC in the container. For this, we can consult the “ip.txt” output and compare it with the output of an “docker exec <id> ipconfig /all” in the problematic (running) container itself:

 

ipconfig.PNGReference Container NIC in network compartment 2

In l2bridge networking (used by Flannel host-gw backend), the container gateway should be set to the 2. address exclusively reserved for the bridge endpoint (cbr0_ep) in the same pod subnet.

 

In overlay networking (used by Flannel vxlan backend), the container gateway should be set to the .1 address exclusively reserved for the DR (distributed router) vNIC in the same pod subnet.

 

L2bridge

Going outside of the container, on l2bridge one should also verify that the route tables on the node itself are setup correctly for the bridge endpoint. Here is a sample with the relevant entries containing quad-zero routes for a node with pod subnet 10.244.19.0/24:

 

l2bridgeRoutes - cbr0ep.pngQuad-zero static routes for a node with pod subnet 10.244.19.0/24

The next thing to check on l2bridge is verify that the OutboundNAT policy and the ExceptionList is programmed correctly. For a given endpoint (e.g. 10.244.4.7) we should verify in the endpoint.txt that there exists an OutboundNAT HNS Policy and that the ExceptionList matches with what we entered into the deployment scripts originally:

 

endpoint-highlighted.pngHNS Policies for a typical l2bridge endpoint

Finally, we can also consult the vfpOutput.txt to verify that the L2Rewrite rule exists so that the container MAC is rewritten to the host’s MAC as specified in the l2bridge container networking docs.

 

In the EXTERNAL_L2_REWRITE layer, there should be a rule which matches the container’s source MAC (e.g. "00-15-5D-AA-87-B8") and rewrites it to match the host’s MAC address (e.g. "00-15-5D-05-C3-0C"):

 

l2bridge_rule.pngReference EXTERNAL_L2_REWRITE_LAYER with rules transposing a container MAC to a host MAC

Overlay

For overlay, we can check whether there exists an ENCAP rule that encapsulates outgoing packets correctly with the hosts IP. For example, for a given pod subnet (10.244.3.0/24) with host IP 10.127.130.36:

 

encap_overlay_highlighted.pngReference encapsulation rule used by overlay container networks

 

When can I encounter this issue?

One example configuration error for Flannel (vxlan) overlay that may results in failing east/west connectivity is failing to delete the old SourceVIP.json file whenever the same node is deleted and re-joined to a cluster.

 

NOTE: When deploying L2bridge networks on Azure, user’s also need to configure user-defined routes for each pod subnet allocated to a node for networking to work. Some users opt to use overlay in public cloud environments for that reason instead, where this step isn’t needed.

 

Example #3: Services / Load-balancing does not work

Let’s say we have created a Kubernetes service called “win-webserver” with VIP 10.102.220.146:

 

services_example.PNGExample Kubernetes service on Windows

Load Balancing is usually performed directly on the node itself by replacing the destination VIP (Service IP) with a specified DIP (pod IP). HNS Loadbalancers can be viewed using the “hnsdiag” cmdlet:

 

loadbalancing_annotated.pngTypical HNS Loadbalancer objects on Windows

For a more verbose output, users can also inspect policy.txt to check for “ELB” policies (LoadBalancers) for additional information:

 

loadbalancers_detailed.PNGExample HNS LoadBalancer configuration in policy.txt

The next step usually consists of verifying that the endpoints (e.g. "4d1d1b8c-c12d-461a-a608-11825b6a9189") still exist in endpoint.txt and are reachable by IP from the same source:

 

dip.PNGExample pod DIP endpoint referenced by a HNS Loadbalancer

Finally, we can also check whether the VFP "lbnat" rules exist in the "LB" layer for our service IP 10.102.220.146 (with NodePort 31486):

 

lbnat-highlighted.pngReference VFP rules used for load-balancing containers

 

When can I encounter this issue?

One possible issue that can cause erroneous load balancing is a misconfigured kube-proxy which is responsible for programming these policies. For example, one may fail to pass in the --hostname-override parameter, causing endpoints from the local host to be deleted.

 

NOTE that service VIP resolution from the Windows node itself is not supported on Windows Server 2019, but planned for Windows Server, version 1903.

Example #4: DNS resolution is not working from within the container

For this example, let’s assume that the kube-DNS cluster addon is configured with service IP 10.96.0.10.

Failing DNS resolution is often a symptom of one of the previous examples. For example, (external) DNS resolution would fail if outbound connectivity isn’t present or resolution could also fail if we cannot reach the kube-DNS service.

Thus, the first troubleshooting step should be to analyze whether the kube-DNS service (e.g. 10.96.0.10) is programmed as a HNS LoadBalancer correctly on the problematic node:

 

DNS_loadbalancer.pngHNS LoadBalancer object representing kube-DNS service

Next, we should also check whether the DNS information is set correctly in the ip.txt entry for the container NIC itself:

 

dns-info-highlighted.pngReference DNS configuration in a Windows pod

We should also check whether it’s possible to reach the kube-DNS pods directly and whether that works. This may indicate that there is some problem in resolving the DNS service VIP itself. For example, assuming that one of the DNS pods has IP 10.244.0.3:

 

dns-dip.PNGSending a DNS request directly to the DNS pod endpoint

 

When can I encounter this issue?

One possible misconfiguration that results in DNS resolution problems is an incorrect DNS suffix or DNS service IP which was specified in the CNI config here and here.

 

Step 8: Capture packets and analyze flows

The last step requires in-depth knowledge of the operations that packets from containers undergo and the network flow. As such, it is also the most time-consuming to perform and will vary depending on the observed issue. At a high level, it consists of:

  1. Running startpacketcapture to start the trace
  2. Reproducing the issue – e.g. sending packets from source to destination
  3. Running stoppacketcapture to stop the trace
  4. Analyzing correct processing by the data path at each step

 

Here are a few example animations that showcase some common container network traffic flows:

Pod to Pod:

pod2pod.gifAnimated visualization showing pod to pod connectivity

 

Pod to Internet:

pod_outbound.gifAnimated visualization showing pod to outbound connectivity

 

Pod to Service:

pod-serviceVIP.gifAnimated visualization showing pod to service connectivity

Showing how to analyze and debug these packet captures will be done in the next part(s) of this blog post series through scenario-driven videos showing packet captures for supported networking flows on Windows.

 

For a quick teaser, here is a video recording taken at KubeCon that shows debugging an issue live using startpacketcapture.cmd: https://www.youtube.com/watch?v=tTZFoiLObX4&t=1733

 

Summary

We looked at:

  1. Automated scripts that can be used to verify basic connectivity and correct installation of Kubernetes
  2. HNS networking objects and VFP rules used to network containers
  3. How to query event logs from different Kubernetes components
  4. How to analyze the control path at a high level for common configuration errors using CollectLogs.ps1
  5. Typical network packet flows for common connectivity scenarios

Performing the above steps can go a great length towards understanding the underlying issue for an observed symptom, improve efficacy when it comes to implementing workarounds, and accelerate the speed at which fixes are implemented by others, having already performed the initial investigation work.

 

What’s next?

In the future, we will go over supported connectivity scenarios and specific steps on how to troubleshoot each one of them in-depth. These will build on top of the materials presented here but also contain videos analyzing packet captures, data-path analysis as well as other traces (e.g. HNS tracing).

 

We are looking for your feedback!

Last but not least, the Windows container networking team needs your feedback! What would you like to see next for container networking on Windows? Which bugs are preventing you from realizing your goals? Share your voice in the comments below, or fill out the following survey and influence our future investments!

 

 

Thank you for reading,

David Schott

 

*Special thanks to Dinesh Kumar Govindasamy (Microsoft) for his fantastic work creating & presenting many of the materials used as a basis for this blog at KubeCon Shanghai '18!