{"id":5961,"date":"2024-08-01T22:46:20","date_gmt":"2024-08-01T14:46:20","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=5961"},"modified":"2024-08-01T22:46:20","modified_gmt":"2024-08-01T14:46:20","slug":"%e7%bd%91%e7%bb%9c%e8%af%8a%e6%96%ad%e5%88%a9%e5%99%a8%ef%bc%9a%e6%8e%8c%e6%8f%a1-kubernetes-pod-%e6%8a%93%e5%8c%85%e6%8a%80%e5%b7%a7","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/uncategorized\/%e7%bd%91%e7%bb%9c%e8%af%8a%e6%96%ad%e5%88%a9%e5%99%a8%ef%bc%9a%e6%8e%8c%e6%8f%a1-kubernetes-pod-%e6%8a%93%e5%8c%85%e6%8a%80%e5%b7%a7\/","title":{"rendered":"\u7f51\u7edc\u8bca\u65ad\u5229\u5668\uff1a\u638c\u63e1 Kubernetes Pod \u6293\u5305\u6280\u5de7"},"content":{"rendered":"<div class='wxsyncmain'>\n<section data-tool=\"markdown\u7f16\u8f91\u5668\" data-website=\"https:\/\/markdown.com.cn\/editor\" style=\"font-size: 16px;color: black;padding: 25px 30px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;margin-top: -10px;\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000100\" data-ratio=\"0.11310592459605028\"  data-type=\"gif\" data-w=\"557\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223234198.gif\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000100\" data-ratio=\"0.11310592459605028\"  data-type=\"gif\" data-w=\"557\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223234198.gif\"><\/noscript><\/p>\n<h1 data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 24px;\"><span><\/span><\/h1>\n<h1 data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 24px;\"><span style=\"display: none;\"><\/span><span>\u80cc\u666f<\/span><span><\/span><\/h1>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6709\u6ca1\u6709\u5bf9Pod\u6293\u5305\u800c\u611f\u5230\u82e6\u607c,\u4e0b\u9762\u9488\u5bf9\u5728\u7ebf\u4e0a\u51fa\u73b0\u95ee\u9898\u4e4b\u540e,\u9488\u5bf9Pod\u8fdb\u884c\u6293\u5305<\/p>\n<h1 data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 24px;\"><span style=\"display: none;\"><\/span><span>1. \u5bbf\u4e3b\u673a\u4e0a\u6355\u83b7<\/span><span><\/span><\/h1>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5e94\u7528\u5176\u5b9e\u662f\u8fd0\u884c\u5728 Pod \u5185\u7684 Container \u91cc\u7684\uff0c\u6240\u4ee5\u53ea\u8981\u5b9a\u4f4d\u5230 Container \u88ab\u8c03\u5ea6\u5230\u4e86\u54ea\u4e2a Node \u4e0a\uff0c\u5728\u76f8\u5e94\u7684 Node \u91cc\uff0c\u5bf9\u5bb9\u5668\u8fdb\u884c\u6293\u5305\u5373\u53ef\u3002<\/p>\n<h2 data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: none;\"><\/span><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">2.1 \u5b9a\u4f4dPod ip\u548ccontainerID<\/span><span><\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;\"> <\/span><\/h2>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5b9a\u4f4d Pod \u7684 containerID \u4ee5\u53ca\u5b83\u6240\u8fd0\u884c\u7684\u5bbf\u4e3b\u673a IP<\/p>\n<pre data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223241659.jpeg&quot;) 10px 10px \/ 40px no-repeat rgb(250, 250, 250);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 16px;color: #383a42;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #fafafa;border-radius: 5px;\">INFO[0000]usingtcpdumppathat:<span style=\"color: #50a14f;line-height: 26px;\">'\/root\/.krew\/store\/sniff\/v1.6.2\/static-tcpdump'<\/span>INFO[0000]nocontainerspecified,takingfirstcontainerwefound<span style=\"color: #a626a4;line-height: 26px;\">in<\/span>pod.INFO[0000]selectedcontainer:<span style=\"color: #50a14f;line-height: 26px;\">'app'<\/span>INFO[0000]sniffingmethod:uploadstatictcpdumpINFO[0000]sniffingonpod:<span style=\"color: #50a14f;line-height: 26px;\">'app-prod-97dfb4bf-h59vq'<\/span>[namespace:<span style=\"color: #50a14f;line-height: 26px;\">'default'<\/span>,container:<span style=\"color: #50a14f;line-height: 26px;\">'app'<\/span>,filter:<span style=\"color: #50a14f;line-height: 26px;\">''<\/span>,interface:<span style=\"color: #50a14f;line-height: 26px;\">'any'<\/span>]INFO[0000]uploadingstatictcpdumpbinaryfrom:<span style=\"color: #50a14f;line-height: 26px;\">'\/root\/.krew\/store\/sniff\/v1.6.2\/static-tcpdump'<\/span>to:<span style=\"color: #50a14f;line-height: 26px;\">'\/tmp\/static-tcpdump'<\/span>INFO[0000]uploadingfile:<span style=\"color: #50a14f;line-height: 26px;\">'\/root\/.krew\/store\/sniff\/v1.6.2\/static-tcpdump'<\/span>to<span style=\"color: #50a14f;line-height: 26px;\">'\/tmp\/static-tcpdump'<\/span>oncontainer:<span style=\"color: #50a14f;line-height: 26px;\">'app'<\/span>INFO[0000]executing<span style=\"color: #c18401;line-height: 26px;\">command<\/span>:<span style=\"color: #50a14f;line-height: 26px;\">'[\/bin\/sh-ctest-f\/tmp\/static-tcpdump]'<\/span>oncontainer:<span style=\"color: #50a14f;line-height: 26px;\">'app'<\/span>,pod:<span style=\"color: #50a14f;line-height: 26px;\">'app-prod-97dfb4bf-h59vq'<\/span>,namespace:<span style=\"color: #50a14f;line-height: 26px;\">'default'<\/span>INFO[0000]<span style=\"color: #c18401;line-height: 26px;\">command<\/span>:<span style=\"color: #50a14f;line-height: 26px;\">'[\/bin\/sh-ctest-f\/tmp\/static-tcpdump]'<\/span>executingsuccessfullyexitCode:<span style=\"color: #50a14f;line-height: 26px;\">'0'<\/span>,stdErr:<span style=\"color: #50a14f;line-height: 26px;\">''<\/span>INFO[0000]filefound:<span style=\"color: #50a14f;line-height: 26px;\">''<\/span>INFO[0000]filewasalreadyfoundonremotepodINFO[0000]tcpdumpuploadedsuccessfullyINFO[0000]outputfileoptionspecified,storingoutput<span style=\"color: #a626a4;line-height: 26px;\">in<\/span>:<span style=\"color: #50a14f;line-height: 26px;\">'text.pcap'<\/span>INFO[0000]startsniffingonremotecontainerINFO[0000]executing<span style=\"color: #c18401;line-height: 26px;\">command<\/span>:<span style=\"color: #50a14f;line-height: 26px;\">'[\/tmp\/static-tcpdump-iany-U-w-]'<\/span>oncontainer:<span style=\"color: #50a14f;line-height: 26px;\">'app'<\/span>,pod:<span style=\"color: #50a14f;line-height: 26px;\">'app-prod-97dfb4bf-h59vq'<\/span>,namespace:<span style=\"color: #50a14f;line-height: 26px;\">'default'<\/span><\/code><\/pre>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u770b\u539f\u7406\u662f\u901a\u8fc7\u672c\u5730\u7684\/tmp\/static-tcpdump \u6587\u4ef6\u5f04\u5230pod\u4e2d\u53bb\u6293\u5305<\/p>\n<\/section>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 K8S\u6280\u672f\u6808              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f \u6709\u6ca1\u6709\u5bf9Pod\u6293\u5305\u800c\u611f\u5230\u82e6\u607c,\u4e0b\u9762\u9488\u5bf9\u5728\u7ebf\u4e0a\u51fa\u73b0\u95ee\u9898\u4e4b\u540e,\u9488\u5bf9Pod\u8fdb\u884c\u6293\u5305 1. \u5bbf\u4e3b\u673a\u4e0a\u6355\u83b7 \u5e94\u7528\u5176\u5b9e\u662f\u8fd0\u884c\u5728 Pod  &#8230;<\/p>\n","protected":false},"author":1,"featured_media":5951,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[32,1],"tags":[],"class_list":["post-5961","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-k8s","category-uncategorized"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223225723-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223234198.gif","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223225723-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223225723.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223234198.gif","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223225723-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223225723.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223225723.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223234198.gif","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801223234198.gif","id":"image1"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"K8S","post_date":"2024-08-01","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":226,"next_post_id":5909,"next_post_title":"Ansible\u4e00\u952e\u5b89\u88c5\u9ad8\u53ef\u7528k8s\u96c6\u7fa4","previous_post_id":3642,"previous_post_title":"Spring Boot \u5f15\u5165\u7ebf\u7a0b\u6c60+Queue\u7f13\u51b2\u961f\u5217\u5b9e\u73b0\u9ad8\u5e76\u53d1\u4e0b\u5355\u4e1a\u52a1","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=5961"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5961\/revisions"}],"predecessor-version":[{"id":6263,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5961\/revisions\/6263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/5951"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=5961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=5961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=5961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}