{"id":39012,"date":"2025-05-21T22:04:20","date_gmt":"2025-05-21T14:04:20","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/39012.html"},"modified":"2025-05-21T22:04:20","modified_gmt":"2025-05-21T14:04:20","slug":"go-%e8%af%ad%e8%a8%80%e4%ba%91%e5%8e%9f%e7%94%9f%e5%be%ae%e6%9c%8d%e5%8a%a1%e5%85%a8%e6%a0%88%e5%ae%9e%e6%88%98%ef%bc%9adocker-%e9%95%9c%e5%83%8f%e4%bc%98%e5%8c%96%e3%80%81k8s-%e7%bc%96%e6%8e%92","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/39012.html","title":{"rendered":"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406"},"content":{"rendered":"<p>\u672c\u7cfb\u5217\u6587\u7ae0\u5c06\u4ee5 Go \u8bed\u8a00\u4e3a\u4e3b\u5bfc\u5f00\u53d1\u8bed\u8a00&#xff0c;\u7cfb\u7edf\u6027\u5730\u8bb2\u89e3\u5982\u4f55\u4ece\u96f6\u6784\u5efa\u4e00\u4e2a\u57fa\u4e8e\u5fae\u670d\u52a1\u67b6\u6784\u7684\u5e94\u7528\u7cfb\u7edf&#xff0c;\u6db5\u76d6\u4ee5\u4e0b\u6838\u5fc3\u6a21\u5757&#xff1a;<\/p>\n<ul>\n<li>\u4f7f\u7528 Go \u6784\u5efa\u9ad8\u6027\u80fd\u5fae\u670d\u52a1<\/li>\n<li>\u6784\u5efa\u7cbe\u7b80\u4e14\u9ad8\u6548\u7684 Docker \u955c\u50cf<\/li>\n<li>\u5229\u7528 Kubernetes \u8fdb\u884c\u5fae\u670d\u52a1\u7f16\u6392\u4e0e\u90e8\u7f72<\/li>\n<li>\u901a\u8fc7 Istio \u5b9e\u73b0\u5fae\u670d\u52a1\u7684\u6d41\u91cf\u6cbb\u7406\u3001\u91d1\u4e1d\u96c0\u53d1\u5e03\u3001\u7194\u65ad\u4e0e\u94fe\u8def\u8ffd\u8e2a<\/li>\n<\/ul>\n<hr \/>\n<h4>\u4e8c\u3001\u57fa\u4e8e Go \u7684\u5fae\u670d\u52a1\u5f00\u53d1\u5b9e\u6218<\/h4>\n<h5>2.1 \u4e3a\u4ec0\u4e48\u9009\u62e9 Go \u8bed\u8a00&#xff1f;<\/h5>\n<p>Go \u8bed\u8a00\u5177\u5907\u4ee5\u4e0b\u4f18\u52bf&#xff0c;\u7279\u522b\u9002\u7528\u4e8e\u5fae\u670d\u52a1\u5f00\u53d1&#xff1a;<\/p>\n<ul>\n<li>\u7f16\u8bd1\u578b\u8bed\u8a00&#xff0c;\u8fd0\u884c\u901f\u5ea6\u5feb<\/li>\n<li>\u5185\u7f6e\u5e76\u53d1\u6a21\u578b&#xff08;Goroutine &#043; Channel&#xff09;&#xff0c;\u9002\u5408\u9ad8\u5e76\u53d1\u4e1a\u52a1<\/li>\n<li>\u5f3a\u5927\u7684\u6807\u51c6\u5e93\u548c\u7b80\u6d01\u8bed\u6cd5<\/li>\n<li>\u4e30\u5bcc\u7684\u7b2c\u4e09\u65b9\u751f\u6001&#xff08;\u5982 Gin\u3001gRPC\u3001protobuf\u3001wire \u7b49&#xff09;<\/li>\n<\/ul>\n<h5>2.2 \u6784\u5efa\u7528\u6237\u670d\u52a1&#xff08;user-service&#xff09;<\/h5>\n<p>\u6211\u4eec\u4ee5\u4e00\u4e2a\u7b80\u5355\u7684\u7528\u6237\u670d\u52a1\u4e3a\u4f8b&#xff0c;\u63d0\u4f9b RESTful API \u63a5\u53e3&#xff0c;\u5b9e\u73b0\u7528\u6237\u7684\u6ce8\u518c\u4e0e\u67e5\u8be2\u529f\u80fd\u3002<\/p>\n<p>\u9879\u76ee\u7ed3\u6784&#xff1a;<\/p>\n<p>user-service\/<br \/>\n\u251c\u2500\u2500 main.go<br \/>\n\u251c\u2500\u2500 handler\/<br \/>\n\u2502   \u2514\u2500\u2500 user.go<br \/>\n\u251c\u2500\u2500 model\/<br \/>\n\u2502   \u2514\u2500\u2500 user.go<br \/>\n\u251c\u2500\u2500 router\/<br \/>\n\u2502   \u2514\u2500\u2500 router.go<br \/>\n\u251c\u2500\u2500 Dockerfile<br \/>\n\u2514\u2500\u2500 go.mod<\/p>\n<p>main.go<\/p>\n<p><span class=\"token keyword\">package<\/span> main<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token string\">&#034;user-service\/router&#034;<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">func<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    r <span class=\"token operator\">:&#061;<\/span> router<span class=\"token punctuation\">.<\/span><span class=\"token function\">SetupRouter<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    r<span class=\"token punctuation\">.<\/span><span class=\"token function\">Run<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;:8080&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>handler\/user.go<\/p>\n<p><span class=\"token keyword\">package<\/span> handler<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token string\">&#034;net\/http&#034;<\/span><br \/>\n    <span class=\"token string\">&#034;github.com\/gin-gonic\/gin&#034;<\/span><br \/>\n    <span class=\"token string\">&#034;user-service\/model&#034;<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">func<\/span> <span class=\"token function\">Register<\/span><span class=\"token punctuation\">(<\/span>c <span class=\"token operator\">*<\/span>gin<span class=\"token punctuation\">.<\/span>Context<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">var<\/span> user model<span class=\"token punctuation\">.<\/span>User<br \/>\n    <span class=\"token keyword\">if<\/span> err <span class=\"token operator\">:&#061;<\/span> c<span class=\"token punctuation\">.<\/span><span class=\"token function\">ShouldBindJSON<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>user<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> err <span class=\"token operator\">!&#061;<\/span> <span class=\"token boolean\">nil<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        c<span class=\"token punctuation\">.<\/span><span class=\"token function\">JSON<\/span><span class=\"token punctuation\">(<\/span>http<span class=\"token punctuation\">.<\/span>StatusBadRequest<span class=\"token punctuation\">,<\/span> gin<span class=\"token punctuation\">.<\/span>H<span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;error&#034;<\/span><span class=\"token punctuation\">:<\/span> err<span class=\"token punctuation\">.<\/span><span class=\"token function\">Error<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">return<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    c<span class=\"token punctuation\">.<\/span><span class=\"token function\">JSON<\/span><span class=\"token punctuation\">(<\/span>http<span class=\"token punctuation\">.<\/span>StatusOK<span class=\"token punctuation\">,<\/span> gin<span class=\"token punctuation\">.<\/span>H<span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;message&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;User registered&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>router\/router.go<\/p>\n<p><span class=\"token keyword\">package<\/span> router<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token string\">&#034;github.com\/gin-gonic\/gin&#034;<\/span><br \/>\n    <span class=\"token string\">&#034;user-service\/handler&#034;<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">func<\/span> <span class=\"token function\">SetupRouter<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span>gin<span class=\"token punctuation\">.<\/span>Engine <span class=\"token punctuation\">{<\/span><br \/>\n    r <span class=\"token operator\">:&#061;<\/span> gin<span class=\"token punctuation\">.<\/span><span class=\"token function\">Default<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    r<span class=\"token punctuation\">.<\/span><span class=\"token function\">POST<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/register&#034;<\/span><span class=\"token punctuation\">,<\/span> handler<span class=\"token punctuation\">.<\/span>Register<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> r<br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<hr \/>\n<h4>\u4e09\u3001\u6784\u5efa\u5e76\u4f18\u5316 Docker \u955c\u50cf<\/h4>\n<h5>3.1 \u5e38\u89c1\u955c\u50cf\u95ee\u9898<\/h5>\n<p>\u672a\u7ecf\u4f18\u5316\u7684\u955c\u50cf\u901a\u5e38\u5b58\u5728\u4ee5\u4e0b\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u4f53\u79ef\u5e9e\u5927&#xff08;\u5982\u76f4\u63a5\u4f7f\u7528 golang:latest &#xff09;<\/li>\n<li>\u542b\u6709\u591a\u4f59\u7684\u6784\u5efa\u5de5\u5177\u6216\u4f9d\u8d56<\/li>\n<li>\u5b89\u5168\u9690\u60a3&#xff1a;\u7cfb\u7edf\u5305\u672a\u6e05\u7406\u3001root \u6743\u9650\u8fd0\u884c<\/li>\n<\/ul>\n<h5>3.2 \u4f7f\u7528\u591a\u9636\u6bb5\u6784\u5efa\u4f18\u5316 Dockerfile<\/h5>\n<p># \u7b2c\u4e00\u9636\u6bb5&#xff1a;\u6784\u5efa\u9636\u6bb5<br \/>\nFROM golang:1.20-alpine as builder<\/p>\n<p>WORKDIR \/app<\/p>\n<p>COPY go.mod .\/<br \/>\nCOPY go.sum .\/<br \/>\nRUN go mod download<\/p>\n<p>COPY . .<\/p>\n<p>RUN CGO_ENABLED&#061;0 GOOS&#061;linux go build -a -installsuffix cgo -o user-service .<\/p>\n<p># \u7b2c\u4e8c\u9636\u6bb5&#xff1a;\u751f\u4ea7\u955c\u50cf<br \/>\nFROM alpine:3.18<\/p>\n<p>WORKDIR \/root\/<\/p>\n<p>COPY &#8211;from&#061;builder \/app\/user-service .<\/p>\n<p>EXPOSE 8080<\/p>\n<p>ENTRYPOINT [&#034;.\/user-service&#034;]<\/p>\n<p>\u4f18\u5316\u540e\u955c\u50cf\u4f53\u79ef\u4ece 800MB \u7f29\u51cf\u81f3 20MB \u5de6\u53f3&#xff0c;\u5927\u5927\u63d0\u5347\u90e8\u7f72\u6548\u7387\u3002<\/p>\n<hr \/>\n<h4>\u56db\u3001\u5fae\u670d\u52a1\u7f16\u6392&#xff1a;Kubernetes \u90e8\u7f72\u4e0e\u7ba1\u7406<\/h4>\n<h5>4.1 \u7f16\u5199 Kubernetes YAML \u6587\u4ef6<\/h5>\n<p>Deployment.yaml<\/p>\n<p><span class=\"token key atrule\">apiVersion<\/span><span class=\"token punctuation\">:<\/span> apps\/v1<br \/>\n<span class=\"token key atrule\">kind<\/span><span class=\"token punctuation\">:<\/span> Deployment<br \/>\n<span class=\"token key atrule\">metadata<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n<span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">replicas<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">2<\/span><br \/>\n  <span class=\"token key atrule\">selector<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">matchLabels<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">app<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n  <span class=\"token key atrule\">template<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">metadata<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">labels<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">app<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n    <span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">containers<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n        <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> yourrepo\/user<span class=\"token punctuation\">&#8211;<\/span>service<span class=\"token punctuation\">:<\/span>v1<br \/>\n        <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">containerPort<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">8080<\/span><br \/>\n        <span class=\"token key atrule\">livenessProbe<\/span><span class=\"token punctuation\">:<\/span><br \/>\n          <span class=\"token key atrule\">httpGet<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token key atrule\">path<\/span><span class=\"token punctuation\">:<\/span> \/health<br \/>\n            <span class=\"token key atrule\">port<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">8080<\/span><br \/>\n          <span class=\"token key atrule\">initialDelaySeconds<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">3<\/span><br \/>\n          <span class=\"token key atrule\">periodSeconds<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">10<\/span><\/p>\n<p>Service.yaml<\/p>\n<p><span class=\"token key atrule\">apiVersion<\/span><span class=\"token punctuation\">:<\/span> v1<br \/>\n<span class=\"token key atrule\">kind<\/span><span class=\"token punctuation\">:<\/span> Service<br \/>\n<span class=\"token key atrule\">metadata<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n<span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">selector<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">app<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n  <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">protocol<\/span><span class=\"token punctuation\">:<\/span> TCP<br \/>\n      <span class=\"token key atrule\">port<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">80<\/span><br \/>\n      <span class=\"token key atrule\">targetPort<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">8080<\/span><br \/>\n  <span class=\"token key atrule\">type<\/span><span class=\"token punctuation\">:<\/span> ClusterIP<\/p>\n<h5>4.2 \u81ea\u52a8\u5316\u90e8\u7f72\u4e0e CI\/CD \u96c6\u6210<\/h5>\n<ul>\n<li>\u4f7f\u7528 GitHub Actions\u3001GitLab CI \u6216 Jenkins \u7f16\u5199 CI\/CD \u6d41\u6c34\u7ebf<\/li>\n<li>\u4f7f\u7528 kubectl rollout restart \u5b9e\u73b0\u65e0\u7f1d\u90e8\u7f72<\/li>\n<\/ul>\n<hr \/>\n<h4>\u4e94\u3001\u670d\u52a1\u7f51\u683c\u6cbb\u7406&#xff1a;Istio \u5b9e\u73b0\u6d41\u91cf\u7ba1\u7406\u4e0e\u53ef\u89c2\u6d4b\u6027<\/h4>\n<h5>5.1 \u4e3a\u4ec0\u4e48\u9700\u8981 Istio&#xff1f;<\/h5>\n<p>Kubernetes \u63d0\u4f9b\u4e86\u57fa\u7840\u7684\u670d\u52a1\u53d1\u73b0\u4e0e\u90e8\u7f72\u80fd\u529b&#xff0c;\u4f46\u5728\u6d41\u91cf\u6cbb\u7406\u3001\u5b89\u5168\u52a0\u56fa\u3001\u7194\u65ad\u91cd\u8bd5\u3001\u53ef\u89c2\u6d4b\u6027\u65b9\u9762\u5b58\u5728\u4e0d\u8db3\u3002Istio \u6b63\u597d\u586b\u8865\u4e86\u8fd9\u5757\u7a7a\u767d&#xff1a;<\/p>\n<ul>\n<li>\u52a8\u6001\u8def\u7531\u63a7\u5236&#xff08;\u7070\u5ea6\u3001\u91d1\u4e1d\u96c0\u53d1\u5e03&#xff09;<\/li>\n<li>\u6d41\u91cf\u955c\u50cf<\/li>\n<li>\u94fe\u8def\u8ffd\u8e2a\u3001\u6307\u6807\u91c7\u96c6&#xff08;\u4e0e Prometheus\u3001Grafana \u96c6\u6210&#xff09;<\/li>\n<li>TLS \u52a0\u5bc6\u901a\u4fe1\u3001\u8ba4\u8bc1\u6388\u6743<\/li>\n<\/ul>\n<h5>5.2 \u5b89\u88c5 Istio \u5e76\u542f\u7528 sidecar \u6ce8\u5165<\/h5>\n<p>istioctl <span class=\"token function\">install<\/span> &#8211;set <span class=\"token assign-left variable\">profile<\/span><span class=\"token operator\">&#061;<\/span>demo -y<br \/>\nkubectl label namespace default istio-injection<span class=\"token operator\">&#061;<\/span>enabled<\/p>\n<h5>5.3 \u5b9e\u73b0\u7070\u5ea6\u53d1\u5e03&#xff08;Canary Deployment&#xff09;<\/h5>\n<p><span class=\"token key atrule\">apiVersion<\/span><span class=\"token punctuation\">:<\/span> networking.istio.io\/v1alpha3<br \/>\n<span class=\"token key atrule\">kind<\/span><span class=\"token punctuation\">:<\/span> VirtualService<br \/>\n<span class=\"token key atrule\">metadata<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n<span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">hosts<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;user-service.default.svc.cluster.local&#034;<\/span><br \/>\n  <span class=\"token key atrule\">http<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">route<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">destination<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">host<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n        <span class=\"token key atrule\">subset<\/span><span class=\"token punctuation\">:<\/span> v1<br \/>\n      <span class=\"token key atrule\">weight<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">80<\/span><br \/>\n    <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">destination<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">host<\/span><span class=\"token punctuation\">:<\/span> user<span class=\"token punctuation\">&#8211;<\/span>service<br \/>\n        <span class=\"token key atrule\">subset<\/span><span class=\"token punctuation\">:<\/span> v2<br \/>\n      <span class=\"token key atrule\">weight<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">20<\/span><\/p>\n<p>\u901a\u8fc7 DestinationRule \u5b9a\u4e49\u7248\u672c&#xff0c;VirtualService \u5b9e\u73b0 80% \u8bbf\u95ee\u8d70 v1&#xff0c;20% \u8bbf\u95ee\u8d70 v2&#xff0c;\u4ece\u800c\u5b9e\u73b0\u7070\u5ea6\u53d1\u5e03\u3002<\/p>\n<hr \/>\n<h4>\u516d\u3001\u94fe\u8def\u8ffd\u8e2a\u4e0e\u53ef\u89c2\u6d4b\u6027<\/h4>\n<h5>6.1 \u96c6\u6210 Jaeger &#043; Prometheus &#043; Grafana<\/h5>\n<p>Istio \u81ea\u5e26\u7684\u89c2\u6d4b\u80fd\u529b\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec&#xff1a;<\/p>\n<ul>\n<li>\u8ffd\u8e2a\u8c03\u7528\u94fe&#xff08;Jaeger&#xff09;<\/li>\n<li>\u5b9e\u65f6\u76d1\u63a7\u670d\u52a1&#xff08;Prometheus&#xff09;<\/li>\n<li>\u53ef\u89c6\u5316\u770b\u677f\u5c55\u793a&#xff08;Grafana&#xff09;<\/li>\n<\/ul>\n<p>\u542f\u7528\u4e4b\u540e&#xff0c;\u4f60\u53ef\u4ee5\u901a\u8fc7&#xff1a;<\/p>\n<p>istioctl dashboard jaeger<br \/>\nistioctl dashboard grafana<\/p>\n<p>\u5feb\u901f\u67e5\u770b\u670d\u52a1\u95f4\u7684\u8c03\u7528\u94fe\u8def\u3001\u54cd\u5e94\u5ef6\u65f6\u3001\u9519\u8bef\u7387\u7b49\u6307\u6807\u3002<\/p>\n<hr \/>\n<h4>\u4e03\u3001\u771f\u5b9e\u6848\u4f8b\u5b9e\u6218\u6f14\u7ec3<\/h4>\n<p>\u6211\u4eec\u5c06\u642d\u5efa\u5982\u4e0b\u7cfb\u7edf&#xff1a;<\/p>\n<ul>\n<li>\u7528\u6237\u670d\u52a1&#xff08;User Service&#xff09;<\/li>\n<li>\u8ba2\u5355\u670d\u52a1&#xff08;Order Service&#xff09;<\/li>\n<li>\u652f\u4ed8\u670d\u52a1&#xff08;Payment Service&#xff09;<\/li>\n<\/ul>\n<p>\u529f\u80fd\u6d41\u7a0b&#xff1a;<\/p>\n<li>\u7528\u6237\u8c03\u7528\u521b\u5efa\u8ba2\u5355 API<\/li>\n<li>Order Service \u521b\u5efa\u8ba2\u5355\u5e76\u8c03\u7528 Payment Service<\/li>\n<li>\u5168\u6d41\u7a0b\u901a\u8fc7 Istio \u5b9e\u73b0\u6d41\u91cf\u63a7\u5236\u548c\u94fe\u8def\u8ffd\u8e2a<\/li>\n<p>\u6bcf\u4e2a\u670d\u52a1\u90fd\u4ee5 Go \u5b9e\u73b0&#xff0c;\u72ec\u7acb\u90e8\u7f72\u3001\u76f8\u4e92\u901a\u4fe1&#xff0c;\u5e76\u5728 Kubernetes \u4e0a\u5b9e\u73b0\u5f39\u6027\u4f38\u7f29\u4e0e\u5bb9\u707e\u80fd\u529b\u3002<\/p>\n<hr \/>\n<h4>\u516b\u3001\u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h4>\n<h5>8.1 Docker \u4f18\u5316\u5efa\u8bae<\/h5>\n<ul>\n<li>\u5c3d\u53ef\u80fd\u4f7f\u7528\u591a\u9636\u6bb5\u6784\u5efa<\/li>\n<li>\u4f7f\u7528 Alpine \u7b49\u7cbe\u7b80\u57fa\u7840\u955c\u50cf<\/li>\n<li>\u907f\u514d root \u7528\u6237\u8fd0\u884c\u670d\u52a1<\/li>\n<\/ul>\n<h5>8.2 Kubernetes \u5b9e\u8df5\u6280\u5de7<\/h5>\n<ul>\n<li>\u5b9a\u4e49\u8d44\u6e90\u9650\u5236&#xff08;CPU\/Memory requests &amp; limits&#xff09;<\/li>\n<li>\u7f16\u5199\u5065\u5eb7\u68c0\u67e5&#xff08;Liveness &amp; Readiness Probes&#xff09;<\/li>\n<li>\u4f7f\u7528 ConfigMap &amp; Secret \u89e3\u8026\u914d\u7f6e<\/li>\n<\/ul>\n<h5>8.3 Istio \u6d41\u91cf\u6cbb\u7406\u5efa\u8bae<\/h5>\n<ul>\n<li>\u4f7f\u7528 VirtualService \u7cbe\u786e\u63a7\u5236\u8def\u7531\u7b56\u7565<\/li>\n<li>\u5229\u7528 CircuitBreaker \u9632\u6b62\u96ea\u5d29<\/li>\n<li>\u914d\u5408 Kiali\u3001Grafana \u5b9e\u73b0\u8fd0\u7ef4\u53ef\u89c6\u5316<\/li>\n<\/ul>\n<hr \/>\n<p>\u672c\u7bc7\u6587\u7ae0\u4ece\u5fae\u670d\u52a1\u5f00\u53d1\u5230\u90e8\u7f72\u3001\u6cbb\u7406\u7684\u5b8c\u6574\u8def\u5f84&#xff0c;\u7cfb\u7edf\u5730\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528 Go &#043; Docker &#043; Kubernetes &#043; Istio \u6784\u5efa\u4e00\u4e2a\u53ef\u8fd0\u7ef4\u3001\u53ef\u89c2\u5bdf\u3001\u53ef\u6269\u5c55\u7684\u73b0\u4ee3\u5316\u5fae\u670d\u52a1\u7cfb\u7edf\u3002\u5728\u5b9e\u9645\u4f01\u4e1a\u9879\u76ee\u4e2d&#xff0c;\u8fd9\u4e9b\u80fd\u529b\u5df2\u6210\u4e3a DevOps \u5de5\u7a0b\u5e08\u4e0e\u540e\u7aef\u5f00\u53d1\u8005\u7684\u201c\u6807\u914d\u201d\u3002<\/p>\n<hr \/>\n<p>\u5982\u679c\u4f60\u559c\u6b22\u8fd9\u7bc7\u6587\u7ae0&#xff0c;\u53ef\u4ee5\u70b9\u8d5e\u6536\u85cf&#xff0c;\u4e5f\u6b22\u8fce\u7559\u8a00\u8ba8\u8bba\u4f60\u7684\u5fae\u670d\u52a1\u5b9e\u8df5\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb588\u6b21\uff0c\u70b9\u8d5e13\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u672c\u7cfb\u5217\u6587\u7ae0\u8be6\u7ec6\u8bb2\u89e3\u4e86\u5982\u4f55\u4f7f\u7528 Go \u8bed\u8a00\u6784\u5efa\u57fa\u4e8e\u5fae\u670d\u52a1\u67b6\u6784\u7684\u5e94\u7528\u7cfb\u7edf\uff0c\u6db5\u76d6\u4e86\u4ece\u5f00\u53d1\u5230\u90e8\u7f72\u3001\u6cbb\u7406\u7684\u5168\u6d41\u7a0b\u3002\u6587\u7ae0\u9996\u5148\u4ecb\u7ecd\u4e86 Go \u8bed\u8a00\u5728\u5fae\u670d\u52a1\u5f00\u53d1\u4e2d\u7684\u4f18\u52bf\uff0c\u5982\u9ad8\u6027\u80fd\u3001\u5e76\u53d1\u6a21\u578b\u548c\u7b80\u6d01\u8bed\u6cd5\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a\u7528\u6237\u670d\u52a1\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0 RESTful API\u3002\u968f\u540e\uff0c\u6587\u7ae0\u63a2\u8ba8\u4e86\u5982\u4f55\u6784\u5efa\u548c\u4f18\u5316 Docker \u955c\u50cf\uff0c\u4f7f\u7528\u591a\u9636\u6bb5\u6784\u5efa\u5c06\u955c\u50cf\u4f53\u79ef\u4ece 800MB \u7f29\u51cf\u81f3 20MB\u3002\u63a5\u7740\uff0c\u6587\u7ae0\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528 Kubernetes \u8fdb\u884c\u5fae\u670d\u52a1\u7f16\u6392\u4e0e\u90e8\u7f72\uff0c\u7f16\u5199 YAML \u6587\u4ef6\u5b9e\u73b0\u81ea\u52a8\u5316\u90e8\u7f72\u4e0e CI\/CD \u96c6\u6210\u3002\u6b64\u5916\uff0c\u6587\u7ae0\u8fd8\u8bb2\u89e3\u4e86\u5982\u4f55\u901a\u8fc7 Is<\/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":[746,763,1348,3478],"topic":[],"class_list":["post-39012","post","type-post","status-publish","format-standard","hentry","category-server","tag-golang","tag-763","tag-1348","tag-3478"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406 - \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\/39012.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb588\u6b21\uff0c\u70b9\u8d5e13\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u672c\u7cfb\u5217\u6587\u7ae0\u8be6\u7ec6\u8bb2\u89e3\u4e86\u5982\u4f55\u4f7f\u7528 Go \u8bed\u8a00\u6784\u5efa\u57fa\u4e8e\u5fae\u670d\u52a1\u67b6\u6784\u7684\u5e94\u7528\u7cfb\u7edf\uff0c\u6db5\u76d6\u4e86\u4ece\u5f00\u53d1\u5230\u90e8\u7f72\u3001\u6cbb\u7406\u7684\u5168\u6d41\u7a0b\u3002\u6587\u7ae0\u9996\u5148\u4ecb\u7ecd\u4e86 Go \u8bed\u8a00\u5728\u5fae\u670d\u52a1\u5f00\u53d1\u4e2d\u7684\u4f18\u52bf\uff0c\u5982\u9ad8\u6027\u80fd\u3001\u5e76\u53d1\u6a21\u578b\u548c\u7b80\u6d01\u8bed\u6cd5\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a\u7528\u6237\u670d\u52a1\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0 RESTful API\u3002\u968f\u540e\uff0c\u6587\u7ae0\u63a2\u8ba8\u4e86\u5982\u4f55\u6784\u5efa\u548c\u4f18\u5316 Docker \u955c\u50cf\uff0c\u4f7f\u7528\u591a\u9636\u6bb5\u6784\u5efa\u5c06\u955c\u50cf\u4f53\u79ef\u4ece 800MB \u7f29\u51cf\u81f3 20MB\u3002\u63a5\u7740\uff0c\u6587\u7ae0\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528 Kubernetes \u8fdb\u884c\u5fae\u670d\u52a1\u7f16\u6392\u4e0e\u90e8\u7f72\uff0c\u7f16\u5199 YAML \u6587\u4ef6\u5b9e\u73b0\u81ea\u52a8\u5316\u90e8\u7f72\u4e0e CI\/CD \u96c6\u6210\u3002\u6b64\u5916\uff0c\u6587\u7ae0\u8fd8\u8bb2\u89e3\u4e86\u5982\u4f55\u901a\u8fc7 Is\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/39012.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-21T14:04:20+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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/39012.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/39012.html\",\"name\":\"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-21T14:04:20+00:00\",\"dateModified\":\"2025-05-21T14:04:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/39012.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/39012.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/39012.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406\"}]},{\"@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":"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406 - \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\/39012.html","og_locale":"zh_CN","og_type":"article","og_title":"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb588\u6b21\uff0c\u70b9\u8d5e13\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u672c\u7cfb\u5217\u6587\u7ae0\u8be6\u7ec6\u8bb2\u89e3\u4e86\u5982\u4f55\u4f7f\u7528 Go \u8bed\u8a00\u6784\u5efa\u57fa\u4e8e\u5fae\u670d\u52a1\u67b6\u6784\u7684\u5e94\u7528\u7cfb\u7edf\uff0c\u6db5\u76d6\u4e86\u4ece\u5f00\u53d1\u5230\u90e8\u7f72\u3001\u6cbb\u7406\u7684\u5168\u6d41\u7a0b\u3002\u6587\u7ae0\u9996\u5148\u4ecb\u7ecd\u4e86 Go \u8bed\u8a00\u5728\u5fae\u670d\u52a1\u5f00\u53d1\u4e2d\u7684\u4f18\u52bf\uff0c\u5982\u9ad8\u6027\u80fd\u3001\u5e76\u53d1\u6a21\u578b\u548c\u7b80\u6d01\u8bed\u6cd5\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a\u7528\u6237\u670d\u52a1\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0 RESTful API\u3002\u968f\u540e\uff0c\u6587\u7ae0\u63a2\u8ba8\u4e86\u5982\u4f55\u6784\u5efa\u548c\u4f18\u5316 Docker \u955c\u50cf\uff0c\u4f7f\u7528\u591a\u9636\u6bb5\u6784\u5efa\u5c06\u955c\u50cf\u4f53\u79ef\u4ece 800MB \u7f29\u51cf\u81f3 20MB\u3002\u63a5\u7740\uff0c\u6587\u7ae0\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528 Kubernetes \u8fdb\u884c\u5fae\u670d\u52a1\u7f16\u6392\u4e0e\u90e8\u7f72\uff0c\u7f16\u5199 YAML \u6587\u4ef6\u5b9e\u73b0\u81ea\u52a8\u5316\u90e8\u7f72\u4e0e CI\/CD \u96c6\u6210\u3002\u6b64\u5916\uff0c\u6587\u7ae0\u8fd8\u8bb2\u89e3\u4e86\u5982\u4f55\u901a\u8fc7 Is","og_url":"https:\/\/www.wsisp.com\/helps\/39012.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-21T14:04:20+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/39012.html","url":"https:\/\/www.wsisp.com\/helps\/39012.html","name":"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-21T14:04:20+00:00","dateModified":"2025-05-21T14:04:20+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/39012.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/39012.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/39012.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Go \u8bed\u8a00\u4e91\u539f\u751f\u5fae\u670d\u52a1\u5168\u6808\u5b9e\u6218\uff1aDocker \u955c\u50cf\u4f18\u5316\u3001K8s \u7f16\u6392\u4e0e Istio \u6d41\u91cf\u6cbb\u7406"}]},{"@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\/39012","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=39012"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/39012\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=39012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=39012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=39012"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=39012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}