helm 实践 mysql_如何使用Helm在Kubernetes上使用MySQL设置WordPress

helm 实践 mysql

介绍 (Introduction)

As more developers work within distributed environments, tools like Kubernetes have become central to keeping application components standardized across dynamic build and production environments. With the increasing complexity of application ecosystems and the growing popularity of Kuberbetes, tools that help manage resources within Kubernetes clusters have become essential.

随着越来越多的开发人员在分布式环境中工作,诸如Kubernetes之类的工具已成为在动态构建和生产环境中保持应用程序组件标准化的核心。 随着应用程序生态系统的日益复杂和Kuberbetes的日益普及,帮助管理Kubernetes集群中的资源的工具变得至关重要。

Helm is an open-source package manager for Kubernetes that simplifies the process of deploying and upgrading applications on a Kubernetes cluster, while also providing a way to find and share ready-to-install applications that are packaged as Kubernetes Charts.

Helm是Kubernetes的开源软件包管理器,它简化了在Kubernetes集群上部署和升级应用程序的过程,同时还提供了一种查找和共享打包为Kubernetes Charts的即插即用应用程序的方法。

In this tutorial, we’ll use Helm for setting up WordPress on top of a Kubernetes cluster, in order to create a highly-available website. In addition to leveraging the intrinsic scalability and high availability aspects of Kubernetes, this setup will help keeping WordPress secure by providing simplified upgrade and rollback workflows via Helm.

在本教程中,我们将使用Helm在Kubernetes集群上设置WordPress ,以创建一个高可用性的网站。 除了利用Kubernetes固有的可扩展性和高可用性方面之外,此设置还将通过Helm提供简化的升级和回滚工作流来帮助保持WordPress的安全。

We’ll be using an external MySQL server in order to abstract the database component, since it can be part of a separate cluster or managed service for extended availability. After completing the steps described in this tutorial, you will have a fully functional WordPress installation within a containerized cluster environment managed by Kubernetes.

我们将使用外部MySQL服务器来抽象化数据库组件,因为它可以作为单独的群集或托管服务的一部分以提高可用性。 完成本教程中描述的步骤后,您将在Kubernetes管理的容器化集群环境中安装功能齐全的WordPress。

先决条件 (Prerequisites)

In order to complete this guide, you will need the following available to you:

为了完成本指南,您将需要以下内容:

Before moving on, make sure you’re able to log into your MySQL server, and that you have connectivity to your Kubernetes cluster. In case you have multiple clusters set up in your kubectl config file, you should make sure that you’re connected to the correct cluster by running the following command from your local machine or development server:

在继续之前,请确保您能够登录到MySQL服务器,并且已连接到Kubernetes集群。 如果您在kubectl配置文件中设置了多个集群,则应通过从本地计算机或开发服务器运行以下命令来确保已连接到正确的集群:

  • kubectl config get-contexts

    kubectl配置获取上下文

This is an example output:

这是一个示例输出:


   
   
   
Output
CURRENT NAME CLUSTER AUTHINFO NAMESPACE * do-sfo2-wordpress-cluster do-sfo2-wordpress-cluster do-sfo2-wordpress-cluster-admin minikube minikube minikube

The asterisk sign (*) indicates which cluster is currently the default context. In case you need to change the current context, run:

星号(*)表示当前是默认上下文的群集。 如果需要更改当前上下文,请运行:

  • kubectl config use-context context-name

    kubectl配置使用上下文上下文名称

You should now be ready to follow the rest of the guide.

现在,您应该准备按照指南的其余部分进行操作。

第1步-配置MySQL (Step 1 — Configuring MySQL)

First, we’ll create a d

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值