{"id":107203,"date":"2026-09-19T06:56:34","date_gmt":"2026-09-18T22:56:34","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/107203.html"},"modified":"2026-09-19T06:56:34","modified_gmt":"2026-09-18T22:56:34","slug":"k8s%e9%9b%86%e7%be%a4ci-cdgitops%e8%87%aa%e5%8a%a8%e5%8c%96%e8%bf%90%e7%bb%b4%e9%97%ad%e7%8e%af%e5%ae%9e%e6%93%8d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/107203.html","title":{"rendered":"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd"},"content":{"rendered":"<h2>K8s\u96c6\u7fa4CI\/CD&#043;GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd<\/h2>\n<p>\u6280\u672f\u6808&#xff1a;Kubernetes v1.32.13 &#043; Rocky Linux 8.6 &#043; Containerd 1.7.x<\/p>\n<p>\u64cd\u4f5c\u73af\u5883 \/ \u5bf9\u63a5\u539f\u7406 \/ \u8be6\u7ec6\u6b65\u9aa4 \/ \u5b8c\u6574\u547d\u4ee4 \/ \u914d\u7f6e\u6587\u4ef6 \/ \u9a8c\u8bc1\u6d41\u7a0b \/ \u6392\u9519\u65b9\u6848<\/p>\n<h2>K8s\u96c6\u7fa4CI\/CD&#043;GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd<\/h2>\n<h3>\u64cd\u4f5c\u73af\u5883<\/h3>\n<ul>\n<li>\n<p>K8s \u96c6\u7fa4 3 \u8282\u70b9&#xff1a;k8s-master(192.168.1.10), k8s-node1(192.168.1.11), k8s-node2(192.168.1.12)&#xff0c;K8s \u7248\u672c v1.32.13<\/p>\n<\/li>\n<li>\n<p>\u6392\u969c\u573a\u666f&#xff1a;\u751f\u4ea7\u8fd0\u7ef4\u6392\u969c\u901a\u7528&#xff0c;\u5df2\u90e8\u7f72\u5b8c\u6574K8s\u96c6\u7fa4&#xff0c;\u6838\u5fc3\u7ec4\u4ef6\u6b63\u5e38\u8fd0\u884c&#xff0c;\u4e1a\u52a1Pod\u5df2\u90e8\u7f72&#xff0c;\u76d1\u63a7\u544a\u8b66\u7cfb\u7edf\u5df2\u914d\u7f6e<\/p>\n<\/li>\n<li>\n<p>\u64cd\u4f5c\u7cfb\u7edf Rocky Linux 8.6&#xff0c;\u5bb9\u5668\u8fd0\u884c\u65f6 Containerd 1.7.x&#xff0c;\u7f51\u7edc\u63d2\u4ef6 Calico&#xff0c;\u5b58\u50a8\u5df2\u914d\u7f6ePVC<\/p>\n<\/li>\n<li>\n<p>\u5df2\u914d\u7f6ekubectl\u547d\u4ee4\u884c\u5de5\u5177&#xff0c;\u5177\u5907\u96c6\u7fa4\u7ba1\u7406\u5458\u6743\u9650&#xff0c;\u53ef\u8bbf\u95ee\u6240\u6709\u547d\u540d\u7a7a\u95f4\u548c\u8d44\u6e90<\/p>\n<\/li>\n<li>\n<p>\u5df2\u914d\u7f6e\u76d1\u63a7\u7cfb\u7edf&#xff08;Prometheus&#043;Grafana&#xff09;&#xff0c;\u53ef\u67e5\u770b\u96c6\u7fa4\u6307\u6807\u3001\u65e5\u5fd7\u3001\u4e8b\u4ef6&#xff0c;\u4fbf\u4e8e\u6392\u969c\u5b9a\u4f4d<\/p>\n<\/li>\n<\/ul>\n<h3>\u5bf9\u63a5\u539f\u7406<\/h3>\n<p>K8s\u96c6\u7fa4CI\/CD&#043;GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\u662f K8s \u751f\u4ea7\u96c6\u7fa4\u8fd0\u7ef4\u6392\u969c\u4e2d\u7684\u6838\u5fc3\u64cd\u4f5c\u573a\u666f\u3002K8s \u96c6\u7fa4\u6392\u969c\u9075\u5faa&#034;\u7531\u8868\u53ca\u91cc\u3001\u9010\u5c42\u5b9a\u4f4d\u3001\u5feb\u901f\u6062\u590d\u3001\u6839\u56e0\u6839\u6cbb&#034;\u7684\u539f\u5219&#xff1a;\u9996\u5148\u901a\u8fc7\u76d1\u63a7\u544a\u8b66\u548c\u7528\u6237\u53cd\u9988\u53d1\u73b0\u5f02\u5e38&#xff0c;\u7136\u540e\u901a\u8fc7\u96c6\u7fa4\u72b6\u6001\u68c0\u67e5\u3001\u65e5\u5fd7\u5206\u6790\u3001\u4e8b\u4ef6\u8ffd\u8e2a\u3001\u8d44\u6e90\u76d1\u63a7\u7b49\u624b\u6bb5\u9010\u5c42\u5b9a\u4f4d\u6545\u969c\u6839\u56e0&#xff0c;\u63a5\u7740\u91c7\u53d6\u5e94\u6025\u63aa\u65bd\u5feb\u901f\u6062\u590d\u4e1a\u52a1&#xff0c;\u6700\u540e\u8fdb\u884c\u6839\u56e0\u4fee\u590d\u548c\u9884\u9632\u63aa\u65bd\u843d\u5730\u3002\u751f\u4ea7\u8fd0\u7ef4\u6392\u969c\u901a\u7528\u6392\u969c\u7684\u6838\u5fc3\u76ee\u6807\u662f\u786e\u4fdd\u96c6\u7fa4\u9ad8\u53ef\u7528\u3001\u4e1a\u52a1\u8fde\u7eed\u6027\u3001\u6570\u636e\u5b89\u5168\u6027&#xff1a;\u901a\u8fc7\u89c4\u8303\u5316\u7684\u6392\u969c\u6d41\u7a0b\u7f29\u77ed\u6545\u969c\u6062\u590d\u65f6\u95f4&#xff08;MTTR&#xff09;&#xff0c;\u901a\u8fc7\u6df1\u5ea6\u6839\u56e0\u5206\u6790\u907f\u514d\u6545\u969c\u91cd\u590d\u53d1\u751f&#xff0c;\u901a\u8fc7\u9884\u9632\u6027\u5de1\u68c0\u548c\u76d1\u63a7\u544a\u8b66\u63d0\u524d\u53d1\u73b0\u9690\u60a3&#xff0c;\u901a\u8fc7\u6807\u51c6\u5316SOP\u786e\u4fdd\u6392\u969c\u64cd\u4f5c\u53ef\u590d\u5236\u53ef\u8ffd\u6eaf\u3002\u6240\u6709\u6392\u969c\u64cd\u4f5c\u9700\u9075\u5faa&#034;\u5148\u5907\u4efd\u540e\u64cd\u4f5c\u3001\u5148\u89c2\u5bdf\u540e\u53d8\u66f4\u3001\u5148\u7070\u5ea6\u540e\u5168\u91cf&#034;\u7684\u5b89\u5168\u539f\u5219&#xff0c;\u907f\u514d\u6392\u969c\u64cd\u4f5c\u5f15\u53d1\u4e8c\u6b21\u6545\u969c\u3002<\/p>\n<h3>\u8be6\u7ec6\u6b65\u9aa4<\/h3>\n<p>1. \u6545\u969c\u73b0\u8c61\u786e\u8ba4\u4e0e\u96c6\u7fa4\u72b6\u6001\u76d8\u70b9<\/p>\n<p># 1. \u68c0\u67e5\u96c6\u7fa4\u6574\u4f53\u72b6\u6001<br \/>\nkubectl get nodes -o wide<br \/>\nkubectl get pods -A -o wide | head -50<br \/>\nkubectl get events -A &#8211;sort-by&#061;&#039;.lastTimestamp&#039; | tail -30<br \/>\n\u200b<br \/>\n# 2. \u68c0\u67e5\u6838\u5fc3\u7ec4\u4ef6\u72b6\u6001<br \/>\nkubectl get pods -n kube-system -o wide<br \/>\nkubectl get componentstatuses 2&gt;\/dev\/null || kubectl get &#8211;raw&#061;&#039;\/healthz?verbose&#039;<br \/>\n\u200b<br \/>\n# 3. \u68c0\u67e5\u96c6\u7fa4\u8d44\u6e90\u4f7f\u7528<br \/>\nkubectl top nodes<br \/>\nkubectl top pods -A &#8211;sort-by&#061;&#039;cpu&#039; | head -20<br \/>\nkubectl top pods -A &#8211;sort-by&#061;&#039;memory&#039; | head -20<br \/>\n\u200b<br \/>\n# 4. \u68c0\u67e5\u5f02\u5e38Pod<br \/>\nkubectl get pods -A | grep -vE &#039;Running|Completed|NAME&#039;<br \/>\nkubectl get pods -A -o wide | grep -E &#039;Pending|CrashLoop|Error|ImagePull|Terminating|OOMKilled&#039;<br \/>\n\u200b<br \/>\n# 5. \u68c0\u67e5\u8282\u70b9\u72b6\u6001\u8be6\u60c5<br \/>\nkubectl describe nodes | grep -A5 &#039;Conditions:&#039;<br \/>\nkubectl get nodes -o jsonpath&#061;&#039;{.items[*].status.conditions[?(&#064;.type&#061;&#061;&#034;Ready&#034;)].status}&#039;<br \/>\n\u200b<br \/>\n# 6. \u68c0\u67e5\u96c6\u7fa4\u4e8b\u4ef6<br \/>\nkubectl get events -A &#8211;sort-by&#061;&#039;.lastTimestamp&#039; | tail -50<br \/>\nkubectl get events -A &#8211;field-selector type&#061;Warning | tail -30<br \/>\n\u200b<br \/>\n# 7. \u68c0\u67e5\u7f51\u7edc\u72b6\u6001<br \/>\nkubectl get svc -A<br \/>\nkubectl get endpoints -A<br \/>\nkubectl get ingress -A 2&gt;\/dev\/null<br \/>\n\u200b<br \/>\n# 8. \u68c0\u67e5\u5b58\u50a8\u72b6\u6001<br \/>\nkubectl get pv<br \/>\nkubectl get pvc -A<br \/>\nkubectl get storageclass<br \/>\n\u200b<br \/>\n# 9. \u5bfc\u51fa\u5f53\u524d\u72b6\u6001\u5907\u4efd<br \/>\nkubectl get all -A -o yaml &gt; \/tmp\/cluster_state_$(date &#043;%Y%m%d_%H%M%S).yaml<br \/>\nkubectl get nodes -o yaml &gt; \/tmp\/nodes_state_$(date &#043;%Y%m%d_%H%M%S).yaml<br \/>\necho &#034;\u96c6\u7fa4\u72b6\u6001\u5df2\u5907\u4efd\u5230 \/tmp\/&#034;<br \/>\n\u200b<\/p>\n<p>2. \u5907\u4efd\u9632\u62a4\u4e0e\u6392\u969c\u65b9\u6848\u5236\u5b9a<\/p>\n<p># 1. \u5907\u4efd\u5173\u952e\u914d\u7f6e&#xff08;\u6392\u969c\u524d\u5fc5\u505a&#xff09;<br \/>\nkubectl get cm -A -o yaml &gt; \/tmp\/cm_backup_$(date &#043;%Y%m%d_%H%M%S).yaml<br \/>\nkubectl get secret -A -o yaml &gt; \/tmp\/secret_backup_$(date &#043;%Y%m%d_%H%M%S).yaml<br \/>\nkubectl get deployment,statefulset,daemonset -A -o yaml &gt; \/tmp\/workload_backup_$(date &#043;%Y%m%d_%H%M%S).yaml<br \/>\nkubectl get svc,ingress -A -o yaml &gt; \/tmp\/network_backup_$(date &#043;%Y%m%d_%H%M%S).yaml<br \/>\nkubectl get pv,pvc -A -o yaml &gt; \/tmp\/storage_backup_$(date &#043;%Y%m%d_%H%M%S).yaml<br \/>\n\u200b<br \/>\n# 2. \u8bb0\u5f55\u6545\u969c\u73b0\u8c61<br \/>\necho &#034;&#061;&#061;&#061; \u6545\u969c\u73b0\u8c61\u8bb0\u5f55 $(date) &#061;&#061;&#061;&#034; &gt; \/tmp\/troubleshoot_log.txt<br \/>\necho &#034;\u6545\u969c\u65f6\u95f4: $(date)&#034; &gt;&gt; \/tmp\/troubleshoot_log.txt<br \/>\necho &#034;\u6545\u969c\u73b0\u8c61: &#034; &gt;&gt; \/tmp\/troubleshoot_log.txt<br \/>\necho &#034;\u5f71\u54cd\u8303\u56f4: &#034; &gt;&gt; \/tmp\/troubleshoot_log.txt<br \/>\necho &#034;\u4e1a\u52a1\u5f71\u54cd: &#034; &gt;&gt; \/tmp\/troubleshoot_log.txt<br \/>\ncat \/tmp\/troubleshoot_log.txt<br \/>\n\u200b<br \/>\n# 3. \u5236\u5b9a\u6392\u969c\u65b9\u6848<br \/>\ncat &gt; \/tmp\/troubleshoot_plan.md &lt;&lt; &#039;EOF&#039;<br \/>\n# \u6392\u969c\u65b9\u6848<br \/>\n## \u4e00\u3001\u6545\u969c\u73b0\u8c61<br \/>\n## \u4e8c\u3001\u5f71\u54cd\u8303\u56f4\u8bc4\u4f30<br \/>\n## \u4e09\u3001\u6392\u969c\u6b65\u9aa4\u4e0e\u65f6\u95f4\u7a97\u53e3<br \/>\n## \u56db\u3001\u5e94\u6025\u6062\u590d\u63aa\u65bd<br \/>\n## \u4e94\u3001\u6839\u56e0\u5b9a\u4f4d\u65b9\u6cd5<br \/>\n## \u516d\u3001\u4fee\u590d\u65b9\u6848<br \/>\n## \u4e03\u3001\u9a8c\u8bc1\u6807\u51c6<br \/>\n## \u516b\u3001\u56de\u6eda\u65b9\u6848<br \/>\n## \u4e5d\u3001\u98ce\u9669\u70b9\u4e0e\u5e94\u5bf9\u63aa\u65bd<br \/>\nEOF<br \/>\necho &#034;\u6392\u969c\u65b9\u6848\u6a21\u677f\u5df2\u521b\u5efa&#034;<br \/>\n\u200b<br \/>\n# 4. \u786e\u8ba4\u4e1a\u52a1\u7a97\u53e3<br \/>\necho &#034;\u5f53\u524d\u65f6\u95f4: $(date)&#034;<br \/>\necho &#034;\u5efa\u8bae\u5728\u4e1a\u52a1\u4f4e\u5cf0\u671f\u6267\u884c\u6392\u969c\u64cd\u4f5c&#xff0c;\u907f\u514d\u5f71\u54cd\u4e1a\u52a1&#034;<br \/>\n\u200b<br \/>\n# 5. \u901a\u77e5\u76f8\u5173\u4e1a\u52a1\u65b9<br \/>\n# echo &#034;K8s\u96c6\u7fa4\u6392\u969c\u64cd\u4f5c\u901a\u77e5&#034; | mail -s &#034;\u96c6\u7fa4\u6392\u969c\u901a\u77e5&#034; admin&#064;example.com<br \/>\n\u200b<\/p>\n<p>3. \u9010\u5c42\u5b9a\u4f4d\u4e0e\u6839\u56e0\u5206\u6790<\/p>\n<p># 1. \u67e5\u770b\u5f02\u5e38Pod\u8be6\u7ec6\u4fe1\u606f<br \/>\n# kubectl describe pod &lt;pod-name&gt; -n &lt;namespace&gt;<br \/>\n# kubectl logs &lt;pod-name&gt; -n &lt;namespace&gt; &#8211;tail&#061;100<br \/>\n# kubectl logs &lt;pod-name&gt; -n &lt;namespace&gt; &#8211;previous<br \/>\n\u200b<br \/>\n# 2. \u67e5\u770b\u8282\u70b9\u8be6\u7ec6\u4fe1\u606f<br \/>\n# kubectl describe node &lt;node-name&gt;<br \/>\n# \u68c0\u67e5\u8282\u70b9Conditions\u3001\u8d44\u6e90\u3001\u6c61\u70b9\u3001\u6807\u7b7e\u3001\u4e8b\u4ef6<br \/>\n\u200b<br \/>\n# 3. \u67e5\u770b\u6838\u5fc3\u7ec4\u4ef6\u65e5\u5fd7<br \/>\n# kubectl logs -n kube-system &lt;component-pod&gt; &#8211;tail&#061;100<br \/>\n# kubectl logs -n kube-system &lt;component-pod&gt; &#8211;previous<br \/>\n\u200b<br \/>\n# 4. \u67e5\u770betcd\u72b6\u6001<br \/>\n# kubectl exec -n kube-system etcd-&lt;node&gt; &#8212; etcdctl endpoint health<br \/>\n# kubectl exec -n kube-system etcd-&lt;node&gt; &#8212; etcdctl member list<br \/>\n# kubectl exec -n kube-system etcd-&lt;node&gt; &#8212; etcdctl endpoint status &#8211;write-out&#061;table<br \/>\n\u200b<br \/>\n# 5. \u67e5\u770b\u7f51\u7edc\u8fde\u901a\u6027<br \/>\n# kubectl run -it &#8211;rm debug &#8211;image&#061;busybox &#8211;restart&#061;Never &#8212; sh<br \/>\n# \u5728\u5bb9\u5668\u5185\u6267\u884c: nslookup, ping, wget, curl \u7b49<br \/>\n\u200b<br \/>\n# 6. \u67e5\u770b\u5b58\u50a8\u6302\u8f7d<br \/>\n# kubectl describe pvc &lt;pvc-name&gt; -n &lt;namespace&gt;<br \/>\n# kubectl describe pv &lt;pv-name&gt;<br \/>\n# \u767b\u5f55\u8282\u70b9\u67e5\u770b\u6302\u8f7d: df -h, mount, dmesg<br \/>\n\u200b<br \/>\n# 7. \u67e5\u770bkubelet\u72b6\u6001<br \/>\n# \u767b\u5f55\u8282\u70b9\u6267\u884c: systemctl status kubelet<br \/>\n# journalctl -u kubelet -f &#8211;since &#034;10 minutes ago&#034;<br \/>\n\u200b<br \/>\n# 8. \u67e5\u770b\u5bb9\u5668\u8fd0\u884c\u65f6<br \/>\n# \u767b\u5f55\u8282\u70b9\u6267\u884c: crictl ps -a<br \/>\n# crictl logs &lt;container-id&gt;<br \/>\n# crictl inspect &lt;container-id&gt;<br \/>\n\u200b<br \/>\n# 9. \u6267\u884c\u5177\u4f53\u6392\u969c\u64cd\u4f5c&#xff08;\u6839\u636e\u6545\u969c\u7c7b\u578b\u8c03\u6574&#xff09;<br \/>\necho &#034;\u6267\u884c\u5177\u4f53\u6392\u969c\u64cd\u4f5c&#8230;&#034;<br \/>\necho &#034;\u8bf7\u6839\u636e\u6392\u969c\u65b9\u6848\u6267\u884c\u5177\u4f53\u6b65\u9aa4&#034;<br \/>\n\u200b<br \/>\n# 10. \u5e94\u7528\u4fee\u590d\u914d\u7f6e<br \/>\n# kubectl apply -f \/tmp\/fix_config.yaml<br \/>\n# kubectl rollout restart deployment\/&lt;name&gt; -n &lt;namespace&gt;<br \/>\n# kubectl rollout status deployment\/&lt;name&gt; -n &lt;namespace&gt; &#8211;timeout&#061;120s<br \/>\n\u200b<\/p>\n<p>4. \u5e94\u6025\u6062\u590d\u4e0e\u4e1a\u52a1\u9a8c\u8bc1<\/p>\n<p># 1. \u9a8c\u8bc1\u96c6\u7fa4\u72b6\u6001<br \/>\nkubectl get nodes -o wide<br \/>\n# \u9884\u671f&#xff1a;\u6240\u6709\u8282\u70b9 Ready \u72b6\u6001<br \/>\n\u200b<br \/>\n# 2. \u9a8c\u8bc1\u6838\u5fc3\u7ec4\u4ef6<br \/>\nkubectl get pods -n kube-system -o wide<br \/>\n# \u9884\u671f&#xff1a;\u6240\u6709\u6838\u5fc3\u7ec4\u4ef6 Pod Running&#xff0c;READY \u6b63\u5e38<br \/>\n\u200b<br \/>\n# 3. \u9a8c\u8bc1\u4e1a\u52a1Pod<br \/>\nkubectl get pods -A | grep -vE &#039;Running|Completed|NAME&#039;<br \/>\n# \u9884\u671f&#xff1a;\u65e0\u5f02\u5e38Pod<br \/>\n\u200b<br \/>\n# 4. \u9a8c\u8bc1\u4e1a\u52a1\u670d\u52a1<br \/>\n# kubectl get svc -n &lt;namespace&gt;<br \/>\n# kubectl get endpoints -n &lt;namespace&gt;<br \/>\n# \u9884\u671f&#xff1a;Service \u6709\u5bf9\u5e94 Endpoints<br \/>\n\u200b<br \/>\n# 5. \u9a8c\u8bc1\u7f51\u7edc\u8fde\u901a\u6027<br \/>\n# kubectl run -it &#8211;rm debug &#8211;image&#061;busybox &#8211;restart&#061;Never &#8212; nslookup kubernetes.default<br \/>\n# \u9884\u671f&#xff1a;DNS\u89e3\u6790\u6b63\u5e38<br \/>\n# kubectl run -it &#8211;rm debug &#8211;image&#061;busybox &#8211;restart&#061;Never &#8212; wget -O- http:\/\/&lt;service-name&gt;.&lt;namespace&gt;.svc.cluster.local<br \/>\n# \u9884\u671f&#xff1a;\u670d\u52a1\u8bbf\u95ee\u6b63\u5e38<br \/>\n\u200b<br \/>\n# 6. \u9a8c\u8bc1\u5b58\u50a8<br \/>\nkubectl get pvc -A<br \/>\n# \u9884\u671f&#xff1a;PVC Bound \u72b6\u6001<br \/>\n# kubectl exec -it &lt;pod-with-pvc&gt; &#8212; df -h<br \/>\n# \u9884\u671f&#xff1a;\u5b58\u50a8\u6302\u8f7d\u6b63\u5e38<br \/>\n\u200b<br \/>\n# 7. \u9a8c\u8bc1\u8d44\u6e90\u4f7f\u7528<br \/>\nkubectl top nodes<br \/>\nkubectl top pods -A &#8211;sort-by&#061;&#039;cpu&#039; | head -10<br \/>\n# \u9884\u671f&#xff1a;\u8d44\u6e90\u4f7f\u7528\u5728\u5408\u7406\u8303\u56f4\u5185<br \/>\n\u200b<br \/>\n# 8. \u9a8c\u8bc1\u76d1\u63a7\u544a\u8b66<br \/>\n# \u68c0\u67e5Prometheus Targets\u72b6\u6001<br \/>\n# \u68c0\u67e5Grafana\u9762\u677f\u6570\u636e<br \/>\n# \u68c0\u67e5Alertmanager\u544a\u8b66\u72b6\u6001<br \/>\n# \u9884\u671f&#xff1a;\u76d1\u63a7\u6b63\u5e38&#xff0c;\u65e0\u5f02\u5e38\u544a\u8b66<br \/>\n\u200b<br \/>\n# 9. \u9a8c\u8bc1\u4e1a\u52a1\u529f\u80fd<br \/>\n# \u6267\u884c\u4e1a\u52a1\u63a5\u53e3\u6d4b\u8bd5<br \/>\n# curl http:\/\/&lt;\u4e1a\u52a1\u5730\u5740&gt;\/health<br \/>\n# \u9884\u671f&#xff1a;\u4e1a\u52a1\u63a5\u53e3\u8fd4\u56de\u6b63\u5e38<br \/>\n\u200b<br \/>\n# 10. \u6e05\u7406\u8c03\u8bd5\u8d44\u6e90<br \/>\n# kubectl delete pod debug &#8211;ignore-not-found<br \/>\n# kubectl delete -f \/tmp\/debug_resources.yaml 2&gt;\/dev\/null<br \/>\necho &#034;\u9a8c\u8bc1\u5b8c\u6210&#034;<br \/>\n\u200b<\/p>\n<p>5. \u6839\u56e0\u4fee\u590d\u4e0e\u9884\u9632\u914d\u7f6e<\/p>\n<p># 1. \u914d\u7f6e\u76d1\u63a7\u544a\u8b66<br \/>\n# \u68c0\u67e5Prometheus\u544a\u8b66\u89c4\u5219<br \/>\n# kubectl get cm -n monitoring prometheus-rules -o yaml 2&gt;\/dev\/null | head -100<br \/>\n\u200b<br \/>\n# 2. \u914d\u7f6e\u65e5\u5fd7\u91c7\u96c6<br \/>\n# \u68c0\u67e5\u65e5\u5fd7\u91c7\u96c6\u914d\u7f6e<br \/>\n# kubectl get cm -n logging -o name 2&gt;\/dev\/null | head -10<br \/>\n\u200b<br \/>\n# 3. \u914d\u7f6e\u8d44\u6e90\u9650\u5236<br \/>\n# \u68c0\u67e5Deployment\u8d44\u6e90\u9650\u5236<br \/>\n# kubectl get deployment -n &lt;namespace&gt; -o jsonpath&#061;&#039;{.items[*].spec.template.spec.containers[*].resources}&#039;<br \/>\n\u200b<br \/>\n# 4. \u914d\u7f6e\u9ad8\u53ef\u7528<br \/>\n# \u68c0\u67e5\u526f\u672c\u6570\u548c\u53cd\u4eb2\u548c\u6027<br \/>\n# kubectl get deployment -n &lt;namespace&gt; -o jsonpath&#061;&#039;{.items[*].spec.replicas}&#039;<br \/>\n# kubectl get deployment -n &lt;namespace&gt; -o jsonpath&#061;&#039;{.items[*].spec.template.spec.affinity}&#039;<br \/>\n\u200b<br \/>\n# 5. \u914d\u7f6e\u5907\u4efd\u7b56\u7565<br \/>\n# \u68c0\u67e5etcd\u5907\u4efd<br \/>\n# kubectl get cronjob -A 2&gt;\/dev\/null | grep -i backup<br \/>\n# \u68c0\u67e5PV\u5feb\u7167<br \/>\n# kubectl get volumesnapshot -A 2&gt;\/dev\/null<br \/>\n\u200b<br \/>\n# 6. \u914d\u7f6e\u5b89\u5168\u7b56\u7565<br \/>\n# \u68c0\u67e5RBAC\u6743\u9650<br \/>\n# kubectl get clusterrolebinding -o name | head -20<br \/>\n# \u68c0\u67e5\u7f51\u7edc\u7b56\u7565<br \/>\n# kubectl get networkpolicy -A 2&gt;\/dev\/null<br \/>\n\u200b<br \/>\n# 7. \u914d\u7f6e\u8282\u70b9\u7ef4\u62a4<br \/>\n# \u68c0\u67e5\u8282\u70b9\u6c61\u70b9\u548c\u6807\u7b7e<br \/>\n# kubectl get nodes -o jsonpath&#061;&#039;{.items[*].spec.taints}&#039;<br \/>\n# kubectl get nodes &#8211;show-labels<br \/>\n\u200b<br \/>\n# 8. \u914d\u7f6e\u5347\u7ea7\u7b56\u7565<br \/>\n# \u68c0\u67e5\u96c6\u7fa4\u7248\u672c<br \/>\n# kubectl version &#8211;short<br \/>\n# \u68c0\u67e5\u8282\u70b9\u7248\u672c<br \/>\n# kubectl get nodes -o jsonpath&#061;&#039;{.items[*].status.nodeInfo.kubeletVersion}&#039;<br \/>\n\u200b<\/p>\n<p>6. \u6700\u7ec8\u9a8c\u8bc1\u4e0e\u6392\u969c\u62a5\u544a<\/p>\n<p># 1. \u6700\u7ec8\u9a8c\u8bc1\u96c6\u7fa4\u72b6\u6001<br \/>\nkubectl get nodes -o wide<br \/>\nkubectl get pods -A -o wide | grep -vE &#039;Running|Completed|NAME&#039; | wc -l<br \/>\n# \u9884\u671f&#xff1a;\u5f02\u5e38Pod\u6570\u4e3a0<br \/>\n\u200b<br \/>\n# 2. \u9a8c\u8bc1\u6838\u5fc3\u7ec4\u4ef6\u5065\u5eb7<br \/>\nkubectl get &#8211;raw&#061;&#039;\/healthz?verbose&#039; 2&gt;\/dev\/null | head -20<br \/>\n# \u9884\u671f&#xff1a;\u6240\u6709\u5065\u5eb7\u68c0\u67e5\u901a\u8fc7<br \/>\n\u200b<br \/>\n# 3. \u9a8c\u8bc1\u4e1a\u52a1\u670d\u52a1<br \/>\n# kubectl get svc -A<br \/>\n# kubectl get endpoints -A<br \/>\n# \u9884\u671f&#xff1a;\u6240\u6709Service\u6709\u5bf9\u5e94Endpoints<br \/>\n\u200b<br \/>\n# 4. \u9a8c\u8bc1\u76d1\u63a7\u6570\u636e<br \/>\n# \u68c0\u67e5Prometheus\u6307\u6807<br \/>\n# kubectl port-forward -n monitoring svc\/prometheus 9090:9090 &amp;<br \/>\n# sleep 5<br \/>\n# curl -s &#039;http:\/\/localhost:9090\/api\/v1\/query?query&#061;up&#039; | jq &#039;.data.result | length&#039;<br \/>\n# \u9884\u671f&#xff1a;\u6307\u6807\u6570\u636e\u6b63\u5e38<br \/>\n\u200b<br \/>\n# 5. \u9a8c\u8bc1\u65e5\u5fd7<br \/>\n# \u68c0\u67e5\u65e5\u5fd7\u91c7\u96c6<br \/>\n# kubectl logs -n logging &lt;fluentd-pod&gt; &#8211;tail&#061;10 2&gt;\/dev\/null<br \/>\n# \u9884\u671f&#xff1a;\u65e5\u5fd7\u6b63\u5e38\u91c7\u96c6<br \/>\n\u200b<br \/>\n# 6. \u751f\u6210\u6392\u969c\u62a5\u544a<br \/>\necho &#034;&#061;&#061;&#061; \u6392\u969c\u62a5\u544a &#061;&#061;&#061;&#034; &gt; \/tmp\/troubleshoot_report.txt<br \/>\necho &#034;\u6392\u969c\u65f6\u95f4: $(date)&#034; &gt;&gt; \/tmp\/troubleshoot_report.txt<br \/>\necho &#034;\u6545\u969c\u73b0\u8c61: &#034; &gt;&gt; \/tmp\/troubleshoot_report.txt<br \/>\necho &#034;\u6839\u56e0\u5206\u6790: &#034; &gt;&gt; \/tmp\/troubleshoot_report.txt<br \/>\necho &#034;\u4fee\u590d\u63aa\u65bd: &#034; &gt;&gt; \/tmp\/troubleshoot_report.txt<br \/>\necho &#034;\u9a8c\u8bc1\u7ed3\u679c: &#034; &gt;&gt; \/tmp\/troubleshoot_report.txt<br \/>\necho &#034;\u9884\u9632\u63aa\u65bd: &#034; &gt;&gt; \/tmp\/troubleshoot_report.txt<br \/>\necho &#034;\u7ecf\u9a8c\u603b\u7ed3: &#034; &gt;&gt; \/tmp\/troubleshoot_report.txt<br \/>\ncat \/tmp\/troubleshoot_report.txt<br \/>\n\u200b<br \/>\n# 7. \u6e05\u7406\u4e34\u65f6\u6587\u4ef6<br \/>\n# rm -f \/tmp\/debug_*.yaml \/tmp\/troubleshoot_*.txt 2&gt;\/dev\/null<br \/>\n# echo &#034;\u4e34\u65f6\u6587\u4ef6\u5df2\u6e05\u7406&#034;<br \/>\n\u200b<br \/>\n# 8. \u6e05\u7406port-forward<br \/>\n# pkill -f &#034;port-forward&#034; 2&gt;\/dev\/null<br \/>\necho &#034;\u6392\u969c\u5b8c\u6210&#034;<br \/>\n\u200b<\/p>\n<h3>\u9a8c\u8bc1\u6d41\u7a0b<\/h3>\n<p># 1. \u96c6\u7fa4\u72b6\u6001\u9a8c\u8bc1<br \/>\nkubectl get nodes -o wide<br \/>\n# \u9884\u671f&#xff1a;\u6240\u6709\u8282\u70b9 Ready<br \/>\n\u200b<br \/>\n# 2. \u6838\u5fc3\u7ec4\u4ef6\u9a8c\u8bc1<br \/>\nkubectl get pods -n kube-system -o wide<br \/>\n# \u9884\u671f&#xff1a;\u6240\u6709\u6838\u5fc3\u7ec4\u4ef6 Running<br \/>\n\u200b<br \/>\n# 3. \u4e1a\u52a1Pod\u9a8c\u8bc1<br \/>\nkubectl get pods -A | grep -vE &#039;Running|Completed|NAME&#039;<br \/>\n# \u9884\u671f&#xff1a;\u65e0\u5f02\u5e38Pod<br \/>\n\u200b<br \/>\n# 4. \u670d\u52a1\u8fde\u901a\u6027\u9a8c\u8bc1<br \/>\n# kubectl run -it &#8211;rm debug &#8211;image&#061;busybox &#8211;restart&#061;Never &#8212; nslookup kubernetes.default<br \/>\n# \u9884\u671f&#xff1a;DNS\u6b63\u5e38<br \/>\n\u200b<br \/>\n# 5. \u8d44\u6e90\u4f7f\u7528\u9a8c\u8bc1<br \/>\nkubectl top nodes<br \/>\nkubectl top pods -A &#8211;sort-by&#061;&#039;cpu&#039; | head -10<br \/>\n# \u9884\u671f&#xff1a;\u8d44\u6e90\u5408\u7406<br \/>\n\u200b<br \/>\n# 6. \u76d1\u63a7\u544a\u8b66\u9a8c\u8bc1<br \/>\n# \u68c0\u67e5Prometheus\/Grafana\/Alertmanager\u72b6\u6001<br \/>\n# \u9884\u671f&#xff1a;\u76d1\u63a7\u6b63\u5e38<br \/>\n\u200b<br \/>\n# 7. \u4e1a\u52a1\u529f\u80fd\u9a8c\u8bc1<br \/>\n# curl http:\/\/&lt;\u4e1a\u52a1\u5730\u5740&gt;\/health<br \/>\n# \u9884\u671f&#xff1a;\u4e1a\u52a1\u6b63\u5e38<br \/>\n\u200b<br \/>\n# 8. \u6392\u969c\u62a5\u544a\u9a8c\u8bc1<br \/>\ncat \/tmp\/troubleshoot_report.txt<br \/>\n# \u9884\u671f&#xff1a;\u62a5\u544a\u5b8c\u6574<br \/>\n\u200b<\/p>\n<h3>\u6392\u9519\u65b9\u6848<\/h3>\n<ul>\n<li>\n<p>\u96c6\u7fa4\u6574\u4f53\u53ef\u7528\u6027\u95ee\u9898&#xff1a;\u68c0\u67e5\u8282\u70b9\u72b6\u6001\u3001\u6838\u5fc3\u7ec4\u4ef6\u3001\u7f51\u7edc\u3001\u5b58\u50a8\u3001\u8d44\u6e90\u3001\u76d1\u63a7\u3001\u544a\u8b66\u3001\u9ad8\u53ef\u7528\u3001\u5bb9\u707e\u3001SLA<\/p>\n<\/li>\n<li>\n<p>\u4e1a\u52a1\u4e2d\u65ad\u6545\u969c&#xff1a;\u68c0\u67e5\u5e94\u7528\u72b6\u6001\u3001Pod\u3001Service\u3001Ingress\u3001\u4f9d\u8d56\u3001\u8d44\u6e90\u3001\u7f51\u7edc\u3001\u5b58\u50a8\u3001\u914d\u7f6e\u3001\u65e5\u5fd7\u3001\u76d1\u63a7\u3001\u5b9a\u4f4d\u3001\u6062\u590d<\/p>\n<\/li>\n<li>\n<p>\u8fd0\u7ef4\u64cd\u4f5c\u5931\u8bef&#xff1a;\u68c0\u67e5\u64cd\u4f5c\u8bb0\u5f55\u3001\u53d8\u66f4\u3001\u56de\u6eda\u3001\u5907\u4efd\u3001\u5f71\u54cd\u8303\u56f4\u3001\u6062\u590d\u6d41\u7a0b\u3001\u9a8c\u8bc1\u3001\u590d\u76d8\u3001\u6539\u8fdb\u3001SOP<\/p>\n<\/li>\n<li>\n<p>\u76d1\u63a7\u544a\u8b66\u5f02\u5e38&#xff1a;\u68c0\u67e5\u76d1\u63a7\u7ec4\u4ef6\u3001\u91c7\u96c6\u3001\u5b58\u50a8\u3001\u67e5\u8be2\u3001\u544a\u8b66\u89c4\u5219\u3001\u901a\u77e5\u6e20\u9053\u3001\u9759\u9ed8\u3001\u6291\u5236\u3001\u8bef\u62a5\u3001\u6f0f\u62a5\u3001\u5b9a\u4f4d\u3001\u4fee\u590d<\/p>\n<\/li>\n<li>\n<p>\u65e5\u5fd7\u5f02\u5e38&#xff1a;\u68c0\u67e5\u65e5\u5fd7\u91c7\u96c6\u3001\u5b58\u50a8\u3001\u8f6e\u8f6c\u3001\u67e5\u8be2\u3001\u805a\u5408\u3001\u683c\u5f0f\u3001\u7ea7\u522b\u3001\u4e22\u5931\u3001\u7206\u6ee1\u3001\u8d44\u6e90\u3001\u5b9a\u4f4d\u3001\u4fee\u590d<\/p>\n<\/li>\n<li>\n<p>\u5b89\u5168\u4e8b\u4ef6&#xff1a;\u68c0\u67e5\u5ba1\u8ba1\u65e5\u5fd7\u3001\u5f02\u5e38\u8bbf\u95ee\u3001\u6743\u9650\u53d8\u66f4\u3001\u6f0f\u6d1e\u3001\u5165\u4fb5\u3001\u6570\u636e\u6cc4\u9732\u3001\u5e94\u6025\u54cd\u5e94\u3001\u9694\u79bb\u3001\u53d6\u8bc1\u3001\u4fee\u590d\u3001\u590d\u76d8<\/p>\n<\/li>\n<li>\n<p>\u5bb9\u91cf\u89c4\u5212&#xff1a;\u68c0\u67e5\u8d44\u6e90\u4f7f\u7528\u7387\u3001\u589e\u957f\u8d8b\u52bf\u3001\u4e1a\u52a1\u9884\u6d4b\u3001\u6269\u5bb9\u8ba1\u5212\u3001\u6210\u672c\u3001\u6027\u80fd\u3001\u74f6\u9888\u3001\u76d1\u63a7\u3001\u9884\u8b66\u3001\u4f18\u5316<\/p>\n<\/li>\n<li>\n<p>\u8fd0\u7ef4\u6807\u51c6\u5316&#xff1a;\u68c0\u67e5SOP\u3001\u6587\u6863\u3001\u6d41\u7a0b\u3001\u81ea\u52a8\u5316\u3001\u76d1\u63a7\u3001\u544a\u8b66\u3001\u5907\u4efd\u3001\u5bb9\u707e\u3001\u5b89\u5168\u3001\u5408\u89c4\u3001\u6301\u7eed\u6539\u8fdb\u3001\u6700<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>K8s\u96c6\u7fa4CI\/CDGitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\u6280\u672f\u6808&#xff1a;Kubernetes v1.32.13  Rocky Linux 8.6  Containerd 1.7.x\u64cd\u4f5c\u73af\u5883 \/ \u5bf9\u63a5\u539f\u7406 \/ \u8be6\u7ec6\u6b65\u9aa4 \/ \u5b8c\u6574\u547d\u4ee4 \/ \u914d\u7f6e\u6587\u4ef6 \/ \u9a8c\u8bc1\u6d41\u7a0b \/ \u6392\u9519\u65b9\u6848K8s\u96c6\u7fa4CI\/CDGitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\u64cd\u4f5c\u73af\u5883K8s \u96c6\u7fa4 3 \u8282\u70b9&#xff1a;k8s-master(192.168.1.10), k8s-node1(192.168.1.11), k8s-n<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[392,120,763,121,78],"topic":[],"class_list":["post-107203","post","type-post","status-publish","format-standard","hentry","category-server","tag-jenkins","tag-kubernetes","tag-763","tag-121","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/107203.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"K8s\u96c6\u7fa4CI\/CDGitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\u6280\u672f\u6808&#xff1a;Kubernetes v1.32.13 Rocky Linux 8.6 Containerd 1.7.x\u64cd\u4f5c\u73af\u5883 \/ \u5bf9\u63a5\u539f\u7406 \/ \u8be6\u7ec6\u6b65\u9aa4 \/ \u5b8c\u6574\u547d\u4ee4 \/ \u914d\u7f6e\u6587\u4ef6 \/ \u9a8c\u8bc1\u6d41\u7a0b \/ \u6392\u9519\u65b9\u6848K8s\u96c6\u7fa4CI\/CDGitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\u64cd\u4f5c\u73af\u5883K8s \u96c6\u7fa4 3 \u8282\u70b9&#xff1a;k8s-master(192.168.1.10), k8s-node1(192.168.1.11), k8s-n\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/107203.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-18T22:56:34+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107203.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/107203.html\",\"name\":\"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-18T22:56:34+00:00\",\"dateModified\":\"2026-09-18T22:56:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/107203.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/107203.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107203.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/107203.html","og_locale":"zh_CN","og_type":"article","og_title":"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"K8s\u96c6\u7fa4CI\/CDGitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\u6280\u672f\u6808&#xff1a;Kubernetes v1.32.13 Rocky Linux 8.6 Containerd 1.7.x\u64cd\u4f5c\u73af\u5883 \/ \u5bf9\u63a5\u539f\u7406 \/ \u8be6\u7ec6\u6b65\u9aa4 \/ \u5b8c\u6574\u547d\u4ee4 \/ \u914d\u7f6e\u6587\u4ef6 \/ \u9a8c\u8bc1\u6d41\u7a0b \/ \u6392\u9519\u65b9\u6848K8s\u96c6\u7fa4CI\/CDGitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd\u64cd\u4f5c\u73af\u5883K8s \u96c6\u7fa4 3 \u8282\u70b9&#xff1a;k8s-master(192.168.1.10), k8s-node1(192.168.1.11), k8s-n","og_url":"https:\/\/www.wsisp.com\/helps\/107203.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-18T22:56:34+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/107203.html","url":"https:\/\/www.wsisp.com\/helps\/107203.html","name":"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-18T22:56:34+00:00","dateModified":"2026-09-18T22:56:34+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/107203.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/107203.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/107203.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"K8s\u96c6\u7fa4CI\/CD+GitOps\u81ea\u52a8\u5316\u8fd0\u7ef4\u95ed\u73af\u5b9e\u64cd"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=107203"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107203\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=107203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=107203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=107203"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=107203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}