Merge pull request #20043 from geekpi/translating

translating
This commit is contained in:
geekpi 2020-11-09 08:49:36 +08:00 committed by GitHub
commit 9e3a5af1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 136 additions and 137 deletions

View File

@ -1,137 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 ways to run Kubernetes locally)
[#]: via: (https://opensource.com/article/20/11/run-kubernetes-locally)
[#]: author: (Bryant Son https://opensource.com/users/brson)
4 ways to run Kubernetes locally
======
Set up a local development environment or just try out the container
orchestration platform with these tools.
![Business woman on laptop sitting in front of window][1]
[Kubernetes][2] is an open source orchestration platform for containers. Developed by Google, it offers an open source system for automating deployment, scaling, and managing containerized applications. Although most people run Kubernetes in a cloud environment, running a Kubernetes cluster locally is not only possible, it has at least two benefits:
* You can quickly try out Kubernetes before deciding to use it as your primary platform to deploy your application.
* You can set it up as a local development environment before pushing anything to a public cloud, thus allowing separation between the development environment and the production environment.
Setting up a local Kubernetes environment as your development environment is the recommended option, no matter your situation, because this setup can create a safe and agile application-deployment process.
Fortunately, there are multiple platforms that you can try out to run Kubernetes locally, and they are all open source and available under the [Apache 2.0][3] license.
* [Minikube][4] has the primary goals of being the best tool for local Kubernetes application development, and to support all Kubernetes features that fit.
* [kind][5] runs local Kubernetes clusters using Docker container "nodes."
* [CodeReady Containers][6] (CRC) manages a local OpenShift 4.x cluster optimized for testing and development purposes.
* [Minishift][7] helps you run OpenShift 3.x clusters locally by running a single-node OpenShift cluster inside a virtual machine (VM).
### Minikube
![Minikube][8]
(Bryant Son, [CC BY-SA 4.0][9])
[Minikube][10] is the most well-known and popular choice to run a Kubernetes environment on a local computer. No matter what operating system you use, [Minikube's documentation][11] offers an easy [installation][12] guide for you. Generally, installing Minikube is as simple as running two commands:
```
$ curl -LO <https://storage.googleapis.com/minikube/releases/latest/minikube-PLATFORM-amd64>
$ sudo install minikube-PLATFORM-amd64 /usr/local/bin/minikube
```
Minikube quickly sets up a local Kubernetes cluster on Linux, macOS, or Windows with the following features:
* Supports the latest Kubernetes release (+6 previous minor versions)
* Cross-platform (Linux, macOS, Windows)
* Deploys as a VM, a container, or on bare-metal
* Multiple container runtimes (CRI-O, containerd, Docker)
* Docker API endpoint for blazing-fast image pushes
* LoadBalancer, filesystem mounts, FeatureGates, and other advanced features
* Add-ons for easily installing Kubernetes applications
Because Minikube is an open source project, you can contribute to its [source code][4].
### kind
![kind][13]
(Bryant Son, [CC BY-SA 4.0][9])
[kind][14]'s developers describe it as "a tool for running local Kubernetes clusters using Docker container 'nodes.'" It was designed for testing Kubernetes but may also be used for local development or continuous integration.
kind supports:
* Multi-node (including high-availability) clusters
* Building Kubernetes release builds from source
* Make/Bash/Docker or Bazel, in addition to pre-published builds
* Linux, macOS, and Windows
In addition, kind is a Cloud Native Computing Foundation (CNCF)-certified conformant Kubernetes installer. Because it's open source, you can find kind's [source code][5] in its GitHub repository.
### CodeReady Container (CRC)
![CodeReady Container][15]
(Bryant Son, [CC BY-SA 4.0][9])
If you want to try the latest version of OpenShift locally, try Red Hat [CodeReady Containers][16] (CRC). CRC brings a minimal OpenShift 4.x cluster to your local computer that provides a minimal environment for development and testing purposes. CRC is mainly targeted for use on developers' desktops.
You can find CodeReady Container's [source code][6] on GitHub, also available under the Apache 2.0 license.
### Minishift
![Minishift][17]
(Bryant Son, [CC BY-SA 4.0][9])
The [Minishift][7] project [helps you run a version of OpenShift][18] with [OKD][19] locally with a single-node OpenShift cluster inside a virtual machine. You can use it to [try OpenShift][20] or to develop for the cloud, on your local host.
Like the other tools on this list, Minishift is open source, and you can access its [source code][7] on GitHub.
### Kubernetes for the people
As you can see, there are several ways to try out Kubernetes in your local environment. Did I miss anything? Feel free to leave a comment to ask a question or make a suggestion.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/run-kubernetes-locally
作者:[Bryant Son][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/brson
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
[2]: https://kubernetes.io/
[3]: https://www.apache.org/licenses/LICENSE-2.0
[4]: https://github.com/kubernetes/minikube
[5]: https://github.com/kubernetes-sigs/kind
[6]: https://github.com/code-ready/crc
[7]: https://github.com/minishift/minishift
[8]: https://opensource.com/sites/default/files/uploads/1_minikube.jpg (Minikube)
[9]: https://creativecommons.org/licenses/by-sa/4.0/
[10]: https://minikube.sigs.k8s.io/docs/
[11]: https://minikube.sigs.k8s.io/docs
[12]: https://minikube.sigs.k8s.io/docs/start/
[13]: https://opensource.com/sites/default/files/uploads/2_kind.jpg (kind)
[14]: https://kind.sigs.k8s.io
[15]: https://opensource.com/sites/default/files/uploads/4_crc.jpg (CodeReady Container)
[16]: https://code-ready.github.io/crc
[17]: https://opensource.com/sites/default/files/uploads/3_minishift.jpg (Minishift)
[18]: https://www.redhat.com/sysadmin/kubernetes-cluster-laptop
[19]: https://www.okd.io/
[20]: https://www.redhat.com/sysadmin/learn-openshift-minishift

View File

@ -0,0 +1,136 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 ways to run Kubernetes locally)
[#]: via: (https://opensource.com/article/20/11/run-kubernetes-locally)
[#]: author: (Bryant Son https://opensource.com/users/brson)
本地运行 Kubernetes 的 4 种方法
======
设置一个本地开发环境,或者直接用这些工具尝试容器编排平台。
![Business woman on laptop sitting in front of window][1]
[Kubernetes][2] 是一个开源的容器编排平台。它由 Google 开发,为自动化部署、扩展和管理容器化应用提供了一个开源系统。虽然大多数人在云环境中运行 Kubernetes但在本地运行 Kubernetes 集群不仅是可能的,它还至少有两个好处:
* 在决定使用 Kubernetes 作为主要平台部署应用之前,你可以快速试用它。
* 在将任何东西推送到公共云之前,你可以将其设置为本地开发环境,从而实现开发环境和生产环境之间的分离。
无论你的情况如何,将本地 Kubernetes 环境设置为你的开发环境都是推荐的选择,因为这种设置可以创建一个安全而敏捷的应用部署流程。
幸运的是,有多个平台可以让你尝试在本地运行 Kubernetes它们都是开源的并且都是 [Apache 2.0][3] 许可。
* [Minikube][4] 的主要目标是成为本地 Kubernetes 应用开发的最佳工具,并支持所有适合的 Kubernetes 特性。
* [kind][5] 使用 Docker 容器“节点”运行本地 Kubernetes 集群。
* [CodeReady Containers][6] CRC 管理为测试和开发目的优化的本地 OpenShift 4.x 集群。
* [Minishift][7] 通过在虚拟机 VM 内运行单节点 OpenShift 集群,帮助你在本地运行 OpenShift 3.x 集群。
### Minikube
![Minikube][8]
(Bryant Son, [CC BY-SA 4.0][9])
[Minikube][10] 是在本地计算机上运行 Kubernetes 环境的最知名和最流行的选择。无论你使用什么操作系统,[Minikube 的文档][11]都会为你提供一个简单的[安装][12]指南。一般来说,安装 Minikube 只需运行两条命令:
```
$ curl -LO <https://storage.googleapis.com/minikube/releases/latest/minikube-PLATFORM-amd64>
$ sudo install minikube-PLATFORM-amd64 /usr/local/bin/minikube
```
Minikube 可在Linux、macOS 或 Windows 上快速设置本地 Kubernetes 集群,其功能如下:
* 支持最新的 Kubernetes 版本(包括 6 个以前的小版本)
* 跨平台 Linux、macOS、Windows
* 以虚拟机、容器或裸机的形式部署
* 多个容器运行时 CRI-O、containerd、Docker
* 用于快速推送镜像的 Docker API 端点
* 负载均衡器、文件系统挂载、FeatureGates 和其他高级功能
* 用于轻松安装 Kubernetes 应用的附加组件
因为 Minikube 是一个开源项目,你可以对它的[源代码][4]做贡献。
### kind
![kind][13]
(Bryant Son, [CC BY-SA 4.0][9])
[kind][14] 的开发者将其描述为“一个使用 Docker 容器“节点”运行本地 Kubernetes 集群的工具”。它是为测试 Kubernetes 而设计的,但也可能用于本地开发或持续集成。
kind 支持:
* 多节点(包括高可用性)集群。
* 从源码构建 Kubernetes 版本
* Make/Bash/Docker 或 Bazel以及预发布构建。
* Linux、MacOS 和 Windows
此外kind 是一个经过云原生计算基金会 CNCF 认证的 Kubernetes 合规安装程序。因为它是开源的,你可以在它的 GitHub 仓库中找到 kind 的[源码][5]。
### CodeReady Container CRC
![CodeReady Container][15]
(Bryant Son, [CC BY-SA 4.0][9])
如果你想在本地尝试最新版本的 OpenShift可以尝试红帽的 [CodeReady Containers][16] CRC。CRC 将一个最小的 OpenShift 4.x 集群带到你的本地计算机上为开发和测试目的提供一个最小的环境。CRC 主要针对开发者的桌面使用。
你可以在 GitHub 上找到 CodeReady Container 的[源码][6],也是在 Apache 2.0 许可下提供的。
### Minishift
![Minishift][17]
(Bryant Son, [CC BY-SA 4.0][9])
[Minishift][7] 项目帮助你在本地用 [OKD][19] 在虚拟机内的单节点 OpenShift 集群[运行一个版本的 OpenShift][18]。你可以用它来[尝试 OpenShift][20],或者在你的本地主机上为云开发。
和这个列表中的其他工具一样Minishift 也是开源的,你可以在 GitHub 上访问它的[源码][7]。
### 为人服务的 Kubernetes
正如你所看到的,有几种方法可以在本地环境中试用 Kubernetes。我有遗漏么欢迎留言提问或提出建议。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/run-kubernetes-locally
作者:[Bryant Son][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/brson
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
[2]: https://kubernetes.io/
[3]: https://www.apache.org/licenses/LICENSE-2.0
[4]: https://github.com/kubernetes/minikube
[5]: https://github.com/kubernetes-sigs/kind
[6]: https://github.com/code-ready/crc
[7]: https://github.com/minishift/minishift
[8]: https://opensource.com/sites/default/files/uploads/1_minikube.jpg (Minikube)
[9]: https://creativecommons.org/licenses/by-sa/4.0/
[10]: https://minikube.sigs.k8s.io/docs/
[11]: https://minikube.sigs.k8s.io/docs
[12]: https://minikube.sigs.k8s.io/docs/start/
[13]: https://opensource.com/sites/default/files/uploads/2_kind.jpg (kind)
[14]: https://kind.sigs.k8s.io
[15]: https://opensource.com/sites/default/files/uploads/4_crc.jpg (CodeReady Container)
[16]: https://code-ready.github.io/crc
[17]: https://opensource.com/sites/default/files/uploads/3_minishift.jpg (Minishift)
[18]: https://www.redhat.com/sysadmin/kubernetes-cluster-laptop
[19]: https://www.okd.io/
[20]: https://www.redhat.com/sysadmin/learn-openshift-minishift