├── .gitignore ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── assets ├── icons │ ├── logo-xxxx.png │ └── logo-xxxx.svg └── scss │ └── _variables_project.scss ├── config.yaml ├── content ├── _index.md ├── docs │ ├── _index.md │ └── installation │ │ ├── _index.md │ │ └── istioctl.md ├── featured-background.jpg └── search.md ├── docker-compose.yaml ├── docsy.work ├── docsy.work.sum ├── go.mod ├── go.sum ├── hugo.toml ├── layouts └── 404.html ├── package.json └── static └── favicons └── favicon-xxxx.ico /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.gitignore 3 | public/ 4 | resources/ 5 | node_modules/ 6 | node_modules 7 | themes/ 8 | init_docsy.sh 9 | package-lock.json 10 | .hugo_build.lock -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement. You (or your employer) retain the copyright to your contribution; 10 | this simply gives us permission to use and redistribute your contributions as 11 | part of the project. Head over to to see 12 | your current agreements on file or to sign a new one. 13 | 14 | You generally only need to submit a CLA once, so if you've already submitted one 15 | (even if it was for a different project), you probably don't need to do it 16 | again. 17 | 18 | ## Code reviews 19 | 20 | All submissions, including submissions by project members, require review. We 21 | use GitHub pull requests for this purpose. Consult 22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 23 | information on using pull requests. 24 | 25 | ## Community Guidelines 26 | 27 | This project follows 28 | [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). 29 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM floryn90/hugo:ext-alpine 2 | 3 | RUN apk add git && \ 4 | git config --global --add safe.directory /src 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Istio 学习笔记 2 | 3 | 这是个人学习 Istio 的笔记,请点击下面的链接阅读: 4 | 5 | - [在线阅读](https://skyao.io/learning-istio/):hugo格式 + docsy主题,界面清爽。托管于腾讯云香港节点。 6 | - [@github](https://github.com/skyao/learning-istio/):源码托管于github,如有谬误或需讨论,请提issue,欢迎提交PR 7 | 8 | ### 版权申明 9 | 10 | 本笔记内容可以任意转载,但请注明来源并提供链接。 11 | 12 | -------------------------------------------------------------------------------- /assets/icons/logo-xxxx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyao/learning-istio/059afa24c2eb44ae389f2bbf5f31bedfc9c632c0/assets/icons/logo-xxxx.png -------------------------------------------------------------------------------- /assets/icons/logo-xxxx.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /assets/scss/_variables_project.scss: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Add styles or override variables from the theme here. 4 | 5 | */ 6 | 7 | -------------------------------------------------------------------------------- /config.yaml: -------------------------------------------------------------------------------- 1 | # THIS IS A TEST CONFIG ONLY! 2 | # FOR THE CONFIGURATION OF YOUR SITE USE hugo.yaml. 3 | # 4 | # As of Docsy 0.7.0, Hugo 0.110.0 or later must be used. 5 | # 6 | # The sole purpose of this config file is to detect Hugo-module builds that use 7 | # an older version of Hugo. 8 | # 9 | # DO NOT add any config parameters to this file. You can safely delete this file 10 | # if your project is using the required Hugo version. 11 | 12 | module: 13 | hugoVersion: 14 | extended: true 15 | min: 0.110.0 16 | -------------------------------------------------------------------------------- /content/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Istio学习笔记 3 | --- 4 | 5 | {{< blocks/cover title="Istio学习笔记" image_anchor="top" height="full" >}} 6 | 7 | 阅读笔记内容 8 | 9 | 10 | 查看笔记源码 11 | 12 |

Learning is not compulsory… neither is survival.

13 | {{< blocks/link-down color="info" >}} 14 | {{< /blocks/cover >}} 15 | 16 | 17 | {{% blocks/lead color="primary" %}} 18 | Continual improvement allows people pride with increased productivity. But remember there is NO instant pudding. It is a long journey. Don’t tell me ten ways I can’t do something; tell me one way I can! It’s so easy to do nothing! It’s a challenge to do something. 19 | 20 | 持续改进让人们以提高生产力为荣。但请记住,没有什么是可以一蹴而就的。这是一个漫长的过程。不要告诉我不能做什么,告诉可以做什么! 什么都不做太容易了! 做一件事是一种挑战。 21 | 22 | Learning is not compulsory; it’s voluntary. Improvement is not compulsory; it’s voluntary. But to survive, we must learn. The penalty for ignorance is that you get beat up. There is no substitute for knowledge. Yet time is of the essence. 23 | 24 | 学习不是强制性的,而是自愿的。改进不是强制性的,是自愿的。但为了生存,我们必须学习。无知的惩罚是挨打。知识是无法替代的。时不我待,只争朝夕。 25 | 26 | —— by Jacob Walker 27 | {{% /blocks/lead %}} 28 | 29 | 30 | {{% blocks/section %}} 31 | Learning is not compulsory… neither is survival. 32 | {.h1 .text-center} 33 | {.h1 .text-center} 34 | {{% /blocks/section %}} 35 | 36 | 37 | {{% blocks/section %}} 38 | 当才能不足以撑起雄心壮志时,就应该静下心好好学习。 39 | {.h1 .text-center} 40 | {{% /blocks/section %}} -------------------------------------------------------------------------------- /content/docs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Learning Istio" 3 | linkTitle: "学习笔记" 4 | weight: 1 5 | menu: 6 | main: 7 | weight: 20 8 | pre: 9 | date: 2021-08-18 10 | description: > 11 | Istio学习笔记 12 | --- 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /content/docs/installation/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "安装 Istio" 3 | linkTitle: "安装" 4 | weight: 20 5 | date: 2024-06-18 6 | description: > 7 | 安装 Istio 8 | --- 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /content/docs/installation/istioctl.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "使用 istioctl 安装 Istio" 3 | linkTitle: "istioctl" 4 | weight: 10 5 | date: 2024-06-18 6 | description: > 7 | 使用 istioctl 安装 Istio 8 | --- 9 | 10 | 11 | 参考: 12 | 13 | - https://istio.io/latest/docs/setup/install/istioctl/ 14 | 15 | ## 下载 Istio 16 | 17 | 18 | ```bash 19 | curl -L https://istio.io/downloadIstio | sh - 20 | ``` 21 | 22 | 输出为: 23 | 24 | ```bash 25 | curl -L https://istio.io/downloadIstio | sh - 26 | % Total % Received % Xferd Average Speed Time Time Time Current 27 | Dload Upload Total Spent Left Speed 28 | 100 101 100 101 0 0 405 0 --:--:-- --:--:-- --:--:-- 407 29 | 100 4899 100 4899 0 0 4660 0 0:00:01 0:00:01 --:--:-- 18348 30 | 31 | Downloading istio-1.22.1 from https://github.com/istio/istio/releases/download/1.22.1/istio-1.22.1-linux-amd64.tar.gz ... 32 | 33 | Istio 1.22.1 Download Complete! 34 | 35 | Istio has been successfully downloaded into the istio-1.22.1 folder on your system. 36 | 37 | Next Steps: 38 | See https://istio.io/latest/docs/setup/install/ to add Istio to your Kubernetes cluster. 39 | 40 | To configure the istioctl client tool for your workstation, 41 | add the /home/sky/istio-1.22.1/bin directory to your environment path variable with: 42 | export PATH="$PATH:/home/sky/istio-1.22.1/bin" 43 | 44 | Begin the Istio pre-installation check by running: 45 | istioctl x precheck 46 | 47 | Need more information? Visit https://istio.io/latest/docs/setup/install/ 48 | ``` 49 | 50 | 移动到 `~/work/soft/istio` 目录: 51 | 52 | ```bash 53 | mv istio-1.22.1 ~/work/soft/istio 54 | ``` 55 | 56 | 加入到 PATH 路径: 57 | 58 | ```bash 59 | vi ~/.zshrc 60 | ``` 61 | 62 | 增加内容: 63 | 64 | ```bash 65 | # istio 66 | export PATH=/home/sky/work/soft/istio/bin:$GOPATH/bin:$PATH 67 | ``` 68 | 69 | 载入: 70 | 71 | ```bash 72 | source ~/.zshrc 73 | ``` 74 | 75 | 验证: 76 | 77 | ```bash 78 | istio istioctl version 79 | ``` 80 | 81 | 输出为: 82 | 83 | ```bash 84 | $ istio istioctl version 85 | no ready Istio pods in "istio-system" 86 | ``` 87 | 88 | ## 安装 Istio 89 | 90 | 先用 demo 验证一下安装: 91 | 92 | ```bash 93 | istioctl install --set profile=demo -y 94 | ``` 95 | 96 | 输出为: 97 | 98 | ```bash 99 | $ istio istioctl install --set profile=demo -y 100 | ✔ Istio core installed 101 | ✔ Istiod installed 102 | ✔ Ingress gateways installed 103 | ✔ Egress gateways installed 104 | ✔ Installation complete 105 | 106 | Made this installation the default for injection and validation. 107 | ``` 108 | 109 | 自动注入 sidecar: 110 | 111 | ```bash 112 | kubectl label namespace default istio-injection=enabled 113 | ``` 114 | 115 | ### 验证安装 116 | 117 | 查看当前 istio-system 下的 service: 118 | 119 | ```bash 120 | k get services -n istio-system 121 | ``` 122 | 123 | 输出为: 124 | 125 | ```bash 126 | $ k get services -n istio-system 127 | NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 128 | istio-egressgateway ClusterIP 10.103.105.85 80/TCP,443/TCP 2m59s 129 | istio-ingressgateway LoadBalancer 10.102.56.34 15021:30900/TCP,80:30893/TCP,443:31534/TCP,31400:30798/TCP,15443:31954/TCP 2m59s 130 | istiod ClusterIP 10.105.153.105 15010/TCP,15012/TCP,443/TCP,15014/TCP 3m11s 131 | ``` 132 | 133 | 查看当前 istio-system 下的 service: 134 | 135 | ```bash 136 | k get pod -n istio-system 137 | ``` 138 | 139 | 输出为: 140 | 141 | ```bash 142 | $ k get pod -n istio-system 143 | NAME READY STATUS RESTARTS AGE 144 | istio-egressgateway-b8b9b64f4-gphx5 1/1 Running 0 4m21s 145 | istio-ingressgateway-6b7c788c74-vr6m9 1/1 Running 0 4m21s 146 | istiod-64d8d5769b-jb9dn 1/1 Running 0 4m33s 147 | ``` 148 | 149 | 150 | 151 | ## bookinfo 案例应用 152 | 153 | ### 部署 154 | 155 | 部署 bookinfo 案例应用: 156 | 157 | ```bash 158 | cd ~/work/soft/istio 159 | kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml 160 | ``` 161 | 162 | 输出为: 163 | 164 | ```bash 165 | $ kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml 166 | 167 | service/details created 168 | serviceaccount/bookinfo-details created 169 | deployment.apps/details-v1 created 170 | service/ratings created 171 | serviceaccount/bookinfo-ratings created 172 | deployment.apps/ratings-v1 created 173 | service/reviews created 174 | serviceaccount/bookinfo-reviews created 175 | deployment.apps/reviews-v1 created 176 | deployment.apps/reviews-v2 created 177 | deployment.apps/reviews-v3 created 178 | service/productpage created 179 | serviceaccount/bookinfo-productpage created 180 | deployment.apps/productpage-v1 created 181 | ``` 182 | 183 | 验证一下: 184 | 185 | ```bash 186 | kubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage | grep -o ".*" 187 | ``` 188 | 189 | 输出为: 190 | 191 | ```html 192 | Simple Bookstore App 15021:30900/TCP,80:30893/TCP,443:31534/TCP,31400:30798/TCP,15443:31954/TCP 18m 216 | ``` 217 | 218 | 简单起见我们用 node port 来访问 istio-ingressgateway 219 | 220 | ```bash 221 | k edit service istio-ingressgateway -n istio-system 222 | ``` 223 | 224 | 将默认的 ` type: LoadBalancer` 改成 ` type: NodePort` 225 | 226 | 然后用浏览器访问如下地址: 227 | 228 | http://192.168.0.101:30893/productpage 229 | 230 | 231 | 232 | ## 安装 kiali 233 | 234 | ### 安装 235 | 236 | 安装 kiali 和其他附件(包括 grafana / zipkin / prometheus) : 237 | 238 | ```bash 239 | istio kubectl apply -f samples/addons 240 | ``` 241 | 242 | 输出为: 243 | 244 | ```bash 245 | serviceaccount/grafana created 246 | configmap/grafana created 247 | service/grafana created 248 | deployment.apps/grafana created 249 | configmap/istio-grafana-dashboards created 250 | configmap/istio-services-grafana-dashboards created 251 | deployment.apps/jaeger created 252 | service/tracing created 253 | service/zipkin created 254 | service/jaeger-collector created 255 | serviceaccount/kiali created 256 | configmap/kiali created 257 | clusterrole.rbac.authorization.k8s.io/kiali-viewer created 258 | clusterrole.rbac.authorization.k8s.io/kiali created 259 | clusterrolebinding.rbac.authorization.k8s.io/kiali created 260 | role.rbac.authorization.k8s.io/kiali-controlplane created 261 | rolebinding.rbac.authorization.k8s.io/kiali-controlplane created 262 | service/kiali created 263 | deployment.apps/kiali created 264 | serviceaccount/loki created 265 | configmap/loki created 266 | configmap/loki-runtime created 267 | service/loki-memberlist created 268 | service/loki-headless created 269 | service/loki created 270 | statefulset.apps/loki created 271 | serviceaccount/prometheus created 272 | configmap/prometheus created 273 | clusterrole.rbac.authorization.k8s.io/prometheus created 274 | clusterrolebinding.rbac.authorization.k8s.io/prometheus created 275 | service/prometheus created 276 | deployment.apps/prometheus created 277 | ``` 278 | 279 | 等待安装完成: 280 | 281 | ```bash 282 | kubectl rollout status deployment/kiali -n istio-system 283 | ``` 284 | 285 | ### 外部访问 286 | 287 | 查看 kiali 服务的情况: 288 | 289 | ```bash 290 | kubectl get svc kiali -n istio-system 291 | ``` 292 | 293 | 输出为: 294 | 295 | ```bash 296 | $ kubectl get svc kiali -n istio-system 297 | NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 298 | kiali ClusterIP 10.99.136.240 20001/TCP,9090/TCP 5m8s 299 | ``` 300 | 301 | 修改为 node port: 302 | 303 | ```bash 304 | kubectl edit svc kiali -n istio-system 305 | ``` 306 | 307 | 将默认的 ` type: LoadBalancer` 改成 ` type: NodePort`。之后再次查看: 308 | 309 | ```bash 310 | kubectl get svc kiali -n istio-system 311 | ``` 312 | 313 | 可以看到 20001 端口已经被映射到 32367 端口: 314 | 315 | ```bash 316 | kubectl get svc kiali -n istio-system 317 | NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 318 | kiali NodePort 10.99.136.240 20001:32367/TCP,9090:32582/TCP 6m18s 319 | ``` 320 | 321 | 打开另外一个终端,执行命令: 322 | 323 | ```bash 324 | istioctl dashboard kiali 325 | ``` 326 | 327 | 输出为; 328 | 329 | ```bash 330 | istioctl dashboard kiali 331 | http://localhost:20001/kiali 332 | ``` 333 | 334 | 用浏览器访问如下地址: 335 | 336 | http://192.168.0.101:32367 337 | 338 | ### kiali的简单使用 339 | 340 | 先给一点请求,以便产生数据: 341 | 342 | ```bash 343 | for i in $(seq 1 100); do curl -s -o /dev/null "http://192.168.0.101:30893/productpage"; done 344 | ``` 345 | 346 | 就可以在 kiali 中看到数据了。 347 | -------------------------------------------------------------------------------- /content/featured-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyao/learning-istio/059afa24c2eb44ae389f2bbf5f31bedfc9c632c0/content/featured-background.jpg -------------------------------------------------------------------------------- /content/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 搜索结果 3 | layout: search 4 | 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | 5 | site: 6 | image: docsy/docsy-example 7 | build: 8 | context: . 9 | command: server 10 | ports: 11 | - "1313:1313" 12 | volumes: 13 | - .:/src 14 | -------------------------------------------------------------------------------- /docsy.work: -------------------------------------------------------------------------------- 1 | go 1.19 2 | 3 | use . 4 | use ../docsy/ // Local docsy clone resides in sibling folder to this project 5 | // use ./themes/docsy/ // Local docsy clone resides in themes folder 6 | -------------------------------------------------------------------------------- /docsy.work.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyao/learning-istio/059afa24c2eb44ae389f2bbf5f31bedfc9c632c0/docsy.work.sum -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/docsy-example 2 | 3 | go 1.12 4 | 5 | require github.com/google/docsy v0.8.0 // indirect 6 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 h1:Uv1z5EqCfmiK4IHUwT0m3h/u/WCk+kpRfxvAZhpC7Gc= 2 | github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= 3 | github.com/google/docsy v0.8.0 h1:RgHyKRTo8YwScMThrf01Ky2yCGpUS1hpkspwNv6szT4= 4 | github.com/google/docsy v0.8.0/go.mod h1:FqTNN2T7pWEGW8dc+v5hQ5VF29W5uaL00PQ1LdVw5F8= 5 | github.com/twbs/bootstrap v5.2.3+incompatible h1:lOmsJx587qfF7/gE7Vv4FxEofegyJlEACeVV+Mt7cgc= 6 | github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 7 | -------------------------------------------------------------------------------- /hugo.toml: -------------------------------------------------------------------------------- 1 | baseURL = "/" 2 | title = "Istio学习笔记" 3 | 4 | # Language settings 5 | contentDir = "content" 6 | defaultContentLanguage = "zh-cn" 7 | defaultContentLanguageInSubdir = false 8 | # Useful when translating. 9 | enableMissingTranslationPlaceholders = true 10 | 11 | enableRobotsTXT = true 12 | 13 | # Will give values to .Lastmod etc. 14 | enableGitInfo = false 15 | 16 | # Comment out to enable taxonomies in Docsy 17 | # disableKinds = ["taxonomy", "taxonomyTerm"] 18 | 19 | # You can add your own taxonomies 20 | [taxonomies] 21 | tag = "tags" 22 | category = "categories" 23 | 24 | [params.taxonomy] 25 | # set taxonomyCloud = [] to hide taxonomy clouds 26 | taxonomyCloud = ["tags", "categories"] 27 | 28 | # If used, must have same length as taxonomyCloud 29 | taxonomyCloudTitle = ["Tag Cloud", "Categories"] 30 | 31 | # set taxonomyPageHeader = [] to hide taxonomies on the page headers 32 | taxonomyPageHeader = ["tags", "categories"] 33 | 34 | 35 | # Highlighting config 36 | pygmentsCodeFences = true 37 | pygmentsUseClasses = false 38 | # Use the new Chroma Go highlighter in Hugo. 39 | pygmentsUseClassic = false 40 | #pygmentsOptions = "linenos=table" 41 | # See https://help.farbox.com/pygments.html 42 | pygmentsStyle = "tango" 43 | 44 | # Configure how URLs look like per section. 45 | [permalinks] 46 | blog = "/:section/:year/:month/:day/:slug/" 47 | 48 | # Image processing configuration. 49 | [imaging] 50 | resampleFilter = "CatmullRom" 51 | quality = 75 52 | anchor = "smart" 53 | 54 | # Language configuration 55 | 56 | [languages] 57 | [languages.zh-cn] 58 | languageName ="中文" 59 | # Weight used for sorting. 60 | weight = 1 61 | [languages.zh-cn.params] 62 | title = "Istio学习笔记" 63 | description = "Istio学习笔记,记录学习Istio的过程和相关资料" 64 | contentDir = "content" 65 | time_format_default = "2006.01.02" 66 | time_format_blog = "2006.01.02" 67 | 68 | [markup] 69 | [markup.goldmark] 70 | [markup.goldmark.parser.attribute] 71 | block = true 72 | [markup.goldmark.renderer] 73 | unsafe = true 74 | [markup.highlight] 75 | # See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html 76 | style = "tango" 77 | # Uncomment if you want your chosen highlight style used for code blocks without a specified language 78 | # guessSyntax = "true" 79 | 80 | # Everything below this are Site Params 81 | 82 | # Comment out if you don't want the "print entire section" link enabled. 83 | [outputs] 84 | section = ["HTML", "print", "RSS"] 85 | 86 | [params] 87 | copyright = "skyao.io" 88 | privacy_policy = "" 89 | 90 | # First one is picked as the Twitter card image if not set on page. 91 | # images = ["images/project-illustration.png"] 92 | 93 | # Menu title if your navbar has a versions selector to access old versions of your site. 94 | # This menu appears only if you have at least one [params.versions] set. 95 | version_menu = "Releases" 96 | 97 | # Flag used in the "version-banner" partial to decide whether to display a 98 | # banner on every page indicating that this is an archived version of the docs. 99 | # Set this flag to "true" if you want to display the banner. 100 | archived_version = false 101 | 102 | # The version number for the version of the docs represented in this doc set. 103 | # Used in the "version-banner" partial to display a version number for the 104 | # current doc set. 105 | version = "0.0" 106 | 107 | # A link to latest version of the docs. Used in the "version-banner" partial to 108 | # point people to the main doc site. 109 | url_latest_version = "https://skyao.io/learning-istio" 110 | 111 | # Repository configuration (URLs for in-page links to opening issues and suggesting changes) 112 | github_repo = "https://github.com/skyao/learning-istio" 113 | # An optional link to a related project repo. For example, the sibling repository where your product code lives. 114 | github_project_repo = "https://github.com/skyao/learning-istio" 115 | 116 | # Specify a value here if your content directory is not in your repo's root directory 117 | # github_subdir = "" 118 | 119 | # Uncomment this if your GitHub repo does not have "main" as the default branch, 120 | # or specify a new value if you want to reference another branch in your GitHub links 121 | github_branch= "main" 122 | 123 | # Google Custom Search Engine ID. Remove or comment out to disable search. 124 | gcs_engine_id = "d3c56aefaae284df1" 125 | # enable google analytics 126 | [services.googleAnalytics] 127 | id = "G-4BVWTNS4MB" 128 | 129 | # Enable Lunr.js offline search 130 | offlineSearch = false 131 | 132 | # Enable syntax highlighting and copy buttons on code blocks with Prism 133 | prism_syntax_highlighting = true 134 | 135 | # User interface configuration 136 | [params.ui] 137 | # Set to true to disable breadcrumb navigation. 138 | breadcrumb_disable = false 139 | # Set to true to disable the About link in the site footer 140 | footer_about_disable = true 141 | # Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar 142 | navbar_logo = true 143 | # Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage. 144 | navbar_translucent_over_cover_disable = false 145 | # Enable to show the side bar menu in its compact state. 146 | sidebar_menu_compact = true 147 | # Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) 148 | sidebar_search_disable = false 149 | 150 | # Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events. 151 | # This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set. 152 | # If you want this feature, but occasionally need to remove the "Feedback" section from a single page, 153 | # add "hide_feedback: true" to the page's front matter. 154 | [params.ui.feedback] 155 | enable = false 156 | # The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful). 157 | yes = 'Glad to hear it! Please tell us how we can improve.' 158 | no = 'Sorry to hear that. Please tell us how we can improve.' 159 | 160 | # Adds a reading time to the top of each doc. 161 | # If you want this feature, but occasionally need to remove the Reading time from a single page, 162 | # add "hide_readingtime: true" to the page's front matter 163 | [params.ui.readingtime] 164 | enable = false 165 | 166 | [params.plantuml] 167 | enable = true 168 | theme = "default" 169 | #Set url to plantuml server 170 | #default is http://www.plantuml.com/plantuml/svg/ 171 | svg_image_url = "https://www.plantuml.com/plantuml/svg/" 172 | 173 | # hugo module configuration 174 | 175 | [module] 176 | # Uncomment the next line to build and serve using local docsy clone declared in the named Hugo workspace: 177 | workspace = "docsy.work" 178 | [module.hugoVersion] 179 | extended = true 180 | min = "0.110.0" 181 | [[module.imports]] 182 | path = "github.com/google/docsy" 183 | disable = false 184 | -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |
3 |

Not found

4 |

Oops! This page doesn't exist. Try going back to the home page.

5 |

You can learn how to make a 404 page like this in Custom 404 Pages.

6 |
7 | {{- end }} 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docsy-example-site", 3 | "version": "0.8.0", 4 | "version.next": "0.8.1-dev.0-unreleased", 5 | "description": "Example site that uses Docsy theme for technical documentation.", 6 | "repository": "github:google/docsy-example", 7 | "homepage": "https://example.docsy.dev", 8 | "author": "Docsy Authors", 9 | "license": "Apache-2.0", 10 | "bugs": "https://github.com/google/docsy-example/issues", 11 | "spelling": "cSpell:ignore HTMLTEST precheck postbuild -", 12 | "scripts": { 13 | "_build": "npm run _hugo-dev --", 14 | "_check:links": "echo IMPLEMENTATION PENDING for check-links; echo", 15 | "_hugo": "hugo --cleanDestinationDir", 16 | "_hugo-dev": "npm run _hugo -- -e dev -DFE", 17 | "_local": "npx cross-env HUGO_MODULE_WORKSPACE=docsy.work", 18 | "_serve": "npm run _hugo-dev -- --minify serve", 19 | "build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"", 20 | "build:production": "npm run _hugo -- --minify", 21 | "build": "npm run _build -- ", 22 | "check:links:all": "HTMLTEST_ARGS= npm run _check:links", 23 | "check:links": "npm run _check:links", 24 | "clean": "rm -Rf public/* resources", 25 | "local": "npm run _local -- npm run", 26 | "make:public": "git init -b main public", 27 | "precheck:links:all": "npm run build", 28 | "precheck:links": "npm run build", 29 | "postbuild:preview": "npm run _check:links", 30 | "postbuild:production": "npm run _check:links", 31 | "serve": "npm run _serve", 32 | "test": "npm run check:links", 33 | "update:pkg:dep": "npm install --save-dev autoprefixer@latest postcss-cli@latest", 34 | "update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest" 35 | }, 36 | "devDependencies": { 37 | "autoprefixer": "^10.4.14", 38 | "cross-env": "^7.0.3", 39 | "hugo-extended": "0.121.1", 40 | "postcss-cli": "^11.0.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /static/favicons/favicon-xxxx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyao/learning-istio/059afa24c2eb44ae389f2bbf5f31bedfc9c632c0/static/favicons/favicon-xxxx.ico --------------------------------------------------------------------------------