![]() ![]() You can verify that the deployment was successful by inspecting the startup output: kubectl logs pod/mysql-sample-0 -c mysql For example: kubectl edit ./mysql-sampleįor more information about TLS configuration, see Configuring TLS for MySQL Instances. If you are updating an existing MySQL instance, you can use the kubectl edit command to edit the YAML configuration in place. If you are creating a new MySQL instance, you can edit the original deployment YAML file and then apply that file to create the instance. In the MySQL instance YAML file, add the spec property. Note: If you are deploying WordPress in the same Kubernetes cluster as the MySQL instance, specify INSTANCE-NAME.INSTANCE-NAMESPACE for spec.dnsNames above.Įdit the YAML file for the MySQL instance so that the instance presents the tls-certificate when receiving a client connection request. fault # See note after the code excerpt That second Issuer generates the tls-certificate that MySQL will present to WordPress. The following command generates two Issuers: the first Issuer, selfsigned-issuer, generates a certificate, ca-certificate, for the second Issuer, tls-issuer. WordPress authenticates signed certificates within the cluster. The certificate must meet the WordPress authentication requirements. Generate a certificate for MySQL to present to WordPress. Install cert-manager if it is not already present in the cluster, following the details in Prerequisites for Installing via the Tanzu Network Registry. This section assumes that the MySQL instance is named mysql-sample and is deployed to the default Kubernetes namespace. This section shows how to deploy the Helm chart for the Bitnami WordPress Stack using TLS certificates generated by cert-manager, the user and database information created in the previous section, and the cluster-internal domain name for the MySQL service. Mysql> GRANT ALL PRIVILEGES ON bitnami_wordpress.* TO OK, 0 rows affected (0.03 sec)Ĭonfigure Your App with MySQL User and Connectivity InformationĪpplication configuration will be specific to the app being deployed. ![]() Mysql> CREATE USER IDENTIFIED WITH mysql_native_password BY 'hunter2' OR, for broader compatibility with older client libraries. Mysql> CREATE USER IDENTIFIED BY 'hunter2' ![]() We show both type of CREATE USER commands below.įor example, the following commands create a bitnami_wordpress database and bn_wordpress user for the Bitnami WordPress Stack deployment: mysql> CREATE DATABASE bitnami_wordpress NOTE: Older MySQL client libraries (such as those base on 5.6) need an older password encryption method. Log in to the MySQL server as the admin user, following the instructions in Get Admin Access to the MySQL Server.Ĭreate any MySQL constructs needed by your app, and create a user with privileges to access those constructs as required by your app. Create a Database and Privileged MySQL User for the App Note: To avoid Kubernetes permissions issues, VMware SQL with MySQL for Kubernetes recommends that you grant developers admin access to their target namespace. For information about creating an instance, see Creating and Deleting MySQL Instances. The MySQL instance can be in a different namespace from the app. For more information, see the Kubernetes documentation.Ī MySQL instance running in the same Kubernetes cluster as the app. The Kubernetes Command Line Interface (kubectl) installed. Prerequisitesīefore connecting an app to a MySQL instance, you must have: The instructions show how to create a MySQL database and privileged user and then deploy the Bitnami WordPress Stack Helm chart configured to use your database and user. This topic demonstrates how you, as an app developer, connect your app to a VMware SQL with MySQL for Kubernetes instance. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |