[zh] sync /platform-setup/minikube/ (#12724)

This commit is contained in:
Michael 2023-02-20 10:47:56 +08:00 committed by GitHub
parent 6e6b4a54ef
commit 4f0a2c3c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 11 deletions

View File

@ -1,7 +1,7 @@
---
title: Minikube
description: 在 Minikube 上配置 Istio。
weight: 21
title: minikube
description: 在 minikube 上配置 Istio。
weight: 50
skip_seealso: true
aliases:
- /zh/docs/setup/kubernetes/prepare/platform-setup/minikube/
@ -17,13 +17,13 @@ test: no
- 运行 minikube 需要管理员权限。
- 如果要启用[秘钥发现服务](https://www.envoyproxy.io/docs/envoy/latest/configuration/security/secret#sds-configuration)SDS需要为 Kubernetes deployment 添加[额外的配置](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection)。
访问 [`api-server` 参考文档](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/)查看最新的可选参数。
- 如果要启用[秘钥发现服务](https://www.envoyproxy.io/docs/envoy/latest/configuration/security/secret#sds-configuration)SDS需要为 Kubernetes Deployment 添加[额外的配置](https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection)。
访问 [`api-server` 参考文档](https://kubernetes.io/zh-cn/docs/reference/command-line-tools-reference/kube-apiserver/)查看最新的可选参数。
## 安装步骤{#installation-steps}
1. 安装最新的 [minikube](https://kubernetes.io/docs/setup/minikube/),版本 **1.1.1 或更高**,以及
[minikube 虚拟机驱动](https://kubernetes.io/docs/tasks/tools/install-minikube/#install-a-hypervisor)。
1. 安装最新的 [minikube](https://kubernetes.io/zh-cn/docs/tasks/tools/#minikube),版本 **1.1.1 或更高**,以及
[minikube 虚拟机驱动](https://minikube.sigs.k8s.io/docs/start/#install-a-hypervisor)。
1. 如果你没有使用默认的驱动,需要配置 minikube 虚拟机驱动。
@ -33,11 +33,11 @@ test: no
$ minikube config set vm-driver kvm2
{{< /text >}}
1. 以 16384 `MB` 内存和 4 `CPUs` 启动 minikube。这个例子使用了 Kubernetes **1.14.2**。
1. 以 16384 `MB` 内存和 4 `CPUs` 启动 minikube。这个例子使用了 Kubernetes **1.26.1**。
你可以设置 `--kubernetes-version` 的值以指定任意 Istio 支持的 Kubernetes 版本:
{{< text bash >}}
$ minikube start --memory=16384 --cpus=4 --kubernetes-version=v1.14.2
$ minikube start --memory=16384 --cpus=4 --kubernetes-version=v1.26.1
{{< /text >}}
取决于你使用的虚拟机版本以及所运行的平台最小内存要求也不同。16384 `MB` 足够运行
@ -53,16 +53,19 @@ test: no
- complete lock-up of the virtual machine
- host NMI watchdog reboots
minikube 中有一个不错的方法查看内存占用:
minikube 中有一个不错的方法查看内存占用,即 `ssh` 到 minikube 虚拟机,然后从命令行运行 top 命令
{{< text bash >}}
$ minikube ssh
{{< /text >}}
{{< text bash >}}
$ top
GiB Mem : 12.4/15.7
{{< /text >}}
这里显示虚拟机内全部的 15.7G 内存已占用了 12.4G。这个数据是在一个 16G 内存的 Macbook Pro 13" 中运行着 Istio 1.2 和
bookinfo 的 VMWare Fusion 虚拟机中生成的。
bookinfo 的 VMWare Fusion 虚拟机中生成的。
{{< /tip >}}
1. (可选,推荐)如果你希望 minikube 提供一个负载均衡给 Istio你可以使用