WordPress with Single Pod

Last updated: 2020-03-27 17:03:00


Operation Scenario

WordPress is a blogging platform developed with PHP. You can use it as a content management system, or use it to create websites on services that support PHP and MySQL databases.

This document describes how to use the tutum/wordpress Image to create a publicly accessible WordPress website.


  • The tutm/wordpress Image includes all operating environments for WordPress, allowing you to pull and create the service directly.
  • Creating WordPress with single pod is for testing purposes only, and persistent data storage cannot be ensured. It is recommended that you use a self-built MySQL or TencentDB to store your data. For more information, please see WordPress Using TencentDB .


Creating WordPress Service

  1. Log in to the TKE console and select Clusters In the left sidebar.
  2. On the "Cluster Management" page, select the cluster ID, for which you want to create the service to enter the "Deployment" page of the cluster workload and click "Create". as shown below:
  3. Set up the workload basic information on the Create Workload Page according to the following instructions. See the figure below:
  • Workload Name : The name of the workload to be created. else:, wordpress Is used as an example.
  • DESCRIPTION : Fill in the related workload information.
  • tag : Key = value. This is a key value pair, and the tag in this example is set by default as k8s-app = wordpress .
  • Namespace : To be selected based on your requirements.
  • Type : To be selected based on your requirements.
  • Volume : Set up the workload volumes mounted based on your requirements. For more details, see Volume Management .
  1. Set up Containers in Pod According to the following instructions. See the figure below:

    The main parameter information is as follows, and the remaining options remain at default values:
  • Name : Enter the custom container name. else:, test Is used as an example.
  • Image : Enter wordpress .
  • Image Tag : Enter latest .
  • Image's pull strategy The following three policies are provided. Please select them as needed. This article takes using the default policy without setting as an example.
    If Image's pull strategy is not set, when Image Tag is empty or latest The Always policy is used, otherwise the IfNotPresent policy is used.
    • ALWAYS Always pull the Image remotely.
    • IfNotPresent Local Image is used by default. If there is no local Image, the Image will be pulled remotely.
    • NEVER Only use local Image. If you don't have the local Image, you will report an exception.
  1. Set up the service's pod number according to the following instructions. See the figure below:
  • Manual adjustment : Set the number of pods. The number of pods in this example is set as 1. You can click + Or - To change the number of pods.
    Adjust the number of pods when any of the set conditions is met
  1. Configure the workload Access settings (service) According to the following instructions. See the figure below:
  • Service : Check Enable .
  • Service Access : Select Via Internet .
  • Load Balancer : Select according to your requirements.
  • Port Mapping : Select TCP protocol, and set both the container port and service port to 80.

The security group of the service's cluster must open the node network and container network to the Internet. It is also required to open ports 30000 to 32768 to the Internet. Otherwise, the problem of TKE being unusable could occur. For more details, see TKE Security Group Settings .
7. Click Create workload To complete the creation of the wordpress service.

Accessing WordPress Service

WordPress service can be accessed using the following two methods.

Accessing WordPress Service Through Cloud Load Balancer IP

  1. In the left sidebar, click Clusters To go to the Cluster Management Page。
  2. Click on the WordPress service's cluster ID and select Service > Service .
  3. Enter the service management page and copy the WordPress service's load balancer IP. See the figure below:
  4. Enter the load balancer IP in the browser's address bar and press Enter To access the service.

Accessing Service Using Service Name

Other services or containers in the cluster can be accessed directly by the service name.

Verifying WordPress Service

When the service is successfully created, you can directly enter the WordPress server configuration page when accessing the service. See the figure below:

More WordPress Settings

If creation of the container failed, you can read the Event FAQs .