{"id":41,"date":"2023-02-17T02:20:13","date_gmt":"2023-02-17T02:20:13","guid":{"rendered":"https:\/\/smartsource.com.sg\/blog\/?p=41"},"modified":"2023-02-17T02:20:13","modified_gmt":"2023-02-17T02:20:13","slug":"warning-failedcreatepodsandbox-19m-x6068-over-24h-kubelet-combined-from-similar-events-failed-to-create-pod-sandbox-rpc-error-code-unknown-desc-failed-to-setup-network-for-sandbox-xx-plugi","status":"publish","type":"post","link":"https:\/\/smartsource.com.sg\/blog\/index.php\/2023\/02\/17\/warning-failedcreatepodsandbox-19m-x6068-over-24h-kubelet-combined-from-similar-events-failed-to-create-pod-sandbox-rpc-error-code-unknown-desc-failed-to-setup-network-for-sandbox-xx-plugi\/","title":{"rendered":"Warning FailedCreatePodSandBox 19m (x6068 over 24h) kubelet (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox xx: plugin type=&#8221;flannel&#8221; failed (add): loadFlannelSubnetEnv failed: open \/run\/flannel\/subnet.env: no such file or directory"},"content":{"rendered":"\n<p>When you setup your kubernetes cluster with flannel plugin as your CNI interface, you will have to make sure the file \/run\/flannel\/subnet.env exists in all your kubernetes worker nodes. Otherwise, the pods that you create will be in forever &#8216;ContainerCreating&#8217; state.<\/p>\n\n\n\n<p><code>sudo vim \/run\/flannel\/subnet.env <\/code><\/p>\n\n\n\n<p>And paste the below four lines and save it<\/p>\n\n\n\n<p><code>FLANNEL_NETWORK=10.244.0.0\/16<br>FLANNEL_SUBNET=10.244.0.1\/24<br>FLANNEL_MTU=1450<br>FLANNEL_IPMASQ=true<\/code><\/p>\n\n\n\n<p>Now when you run kubectl get pods, your pods status should be in running state.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you setup your kubernetes cluster with flannel plugin as your CNI interface, you will have to make sure the file \/run\/flannel\/subnet.env exists in all your kubernetes worker nodes. Otherwise,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[30,29,28],"class_list":["post-41","post","type-post","status-publish","format-standard","hentry","category-question-and-answers","tag-containers","tag-flannel","tag-kubernetes"],"_links":{"self":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":1,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"predecessor-version":[{"id":42,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/41\/revisions\/42"}],"wp:attachment":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}