Skip to content

Commit ff6f532

Browse files
committed
resolve review of mysql
Signed-off-by: Bonusree <[email protected]>
1 parent fed8104 commit ff6f532

File tree

2 files changed

+30
-83
lines changed

2 files changed

+30
-83
lines changed

docs/guides/mysql/rotate-auth/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Rotateauth MySQL
33
menu:
44
docs_{{ .version }}:
55
identifier: guides-mysql-rotate-auth
6-
name: Rotate Authentication MySQL
6+
name: Rotate Authentication
77
parent: guides-mysql
88
weight: 43
99
menu_name: docs_{{ .version }}

docs/guides/mysql/rotate-auth/guide.md

Lines changed: 29 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Mysql Rotateauth Guide
2+
title: MySQL Rotateauth Guide
33
menu:
44
docs_{{ .version }}:
55
identifier: mysql-rotate-auth-guide
@@ -10,9 +10,9 @@ menu_name: docs_{{ .version }}
1010
section_menu_id: guides
1111
---
1212

13-
# Rotate Authentication of Mysql
13+
# Rotate Authentication of MySQL
1414

15-
**Rotate Authentication** is a feature of the KubeDB Ops-Manager that allows you to rotate a `Mysql`
15+
**Rotate Authentication** is a feature of the KubeDB Ops-Manager that allows you to rotate a `MySQL`
1616
user's authentication credentials using a `MySQLopsrequest`. There are two ways to perform this
1717
rotation.
1818

@@ -48,77 +48,24 @@ updates the existing secret with the new credential.
4848
When you have installed KubeDB, it has created `MySQLVersion` crd for all supported MySQL versions. Check it by using the following command,
4949

5050
```bash
51-
$ kubectl get Mysqlversions
51+
$ kubectl get mysqlversion
5252
NAME VERSION DISTRIBUTION DB_IMAGE DEPRECATED AGE
53-
5 5 Official ghcr.io/kubedb/mysql:5 true 25h
54-
5-v1 5 Official ghcr.io/kubedb/mysql:5-v1 true 25h
55-
5.7 5.7 Official ghcr.io/kubedb/mysql:5.7 true 25h
56-
5.7-v1 5.7 Official ghcr.io/kubedb/mysql:5.7-v1 true 25h
57-
5.7-v2 5.7.25 Official ghcr.io/kubedb/mysql:5.7-v2 true 25h
58-
5.7-v3 5.7.25 Official ghcr.io/kubedb/mysql:5.7.25 true 25h
59-
5.7-v4 5.7.29 Official ghcr.io/kubedb/mysql:5.7.29 true 25h
60-
5.7.25 5.7.25 Official ghcr.io/kubedb/mysql:5.7.25 true 25h
61-
5.7.25-v1 5.7.25 Official ghcr.io/kubedb/mysql:5.7.25-v1 true 25h
62-
5.7.25-v2 5.7.25 Official ghcr.io/kubedb/mysql:5.7.25-v2 true 25h
63-
5.7.25-v3 5.7.25 Official mysql:5.7.25 true 25h
64-
5.7.29 5.7.29 Official ghcr.io/kubedb/mysql:5.7.29 true 25h
65-
5.7.29-v1 5.7.29 Official mysql:5.7.29 true 25h
66-
5.7.29-v2 5.7.29 Official mysql:5.7.29 true 25h
67-
5.7.31 5.7.31 Official ghcr.io/kubedb/mysql:5.7.31 true 25h
68-
5.7.31-v1 5.7.31 Official ghcr.io/kubedb/mysql:5.7.31-v1 true 25h
69-
5.7.31-v2 5.7.31 Official mysql:5.7.31 true 25h
70-
5.7.33 5.7.33 Official ghcr.io/kubedb/mysql:5.7.33 true 25h
71-
5.7.33-v1 5.7.33 Official mysql:5.7.33 true 25h
72-
5.7.35 5.7.35 Official ghcr.io/kubedb/mysql:5.7.35 true 25h
73-
5.7.35-v1 5.7.35 Official mysql:5.7.35 true 25h
74-
5.7.36 5.7.36 Official mysql:5.7.36 true 25h
75-
5.7.41 5.7.41 Official ghcr.io/appscode-images/mysql:5.7.41-oracle true 25h
76-
5.7.42-debian 5.7.42 Official ghcr.io/appscode-images/mysql:5.7.42-debian 25h
77-
5.7.44 5.7.44 Official ghcr.io/appscode-images/mysql:5.7.44-oracle 25h
78-
8 8 Official ghcr.io/kubedb/mysql:8 true 25h
79-
8-v1 8 Official ghcr.io/kubedb/mysql:8-v1 true 25h
80-
8.0 8.0 Official ghcr.io/kubedb/mysql:8.0 true 25h
81-
8.0-v1 8.0.3 Official ghcr.io/kubedb/mysql:8.0-v1 true 25h
82-
8.0-v2 8.0.14 Official ghcr.io/kubedb/mysql:8.0-v2 true 25h
83-
8.0-v3 8.0.20 Official ghcr.io/kubedb/mysql:8.0.20 true 25h
84-
8.0.14 8.0.14 Official ghcr.io/kubedb/mysql:8.0.14 true 25h
85-
8.0.14-v1 8.0.14 Official ghcr.io/kubedb/mysql:8.0.14-v1 true 25h
86-
8.0.14-v2 8.0.14 Official ghcr.io/kubedb/mysql:8.0.14-v2 true 25h
87-
8.0.14-v3 8.0.14 Official mysql:8.0.14 true 25h
88-
8.0.17 8.0.17 Official mysql:8.0.17 true 25h
89-
8.0.20 8.0.20 Official ghcr.io/kubedb/mysql:8.0.20 true 25h
90-
8.0.20-v1 8.0.20 Official ghcr.io/kubedb/mysql:8.0.20-v1 true 25h
91-
8.0.20-v2 8.0.20 Official mysql:8.0.20 true 25h
92-
8.0.21 8.0.21 Official ghcr.io/kubedb/mysql:8.0.21 true 25h
93-
8.0.21-v1 8.0.21 Official ghcr.io/kubedb/mysql:8.0.21-v1 true 25h
94-
8.0.21-v2 8.0.21 Official mysql:8.0.21 true 25h
95-
8.0.23 8.0.23 Official ghcr.io/kubedb/mysql:8.0.23 true 25h
96-
8.0.23-v1 8.0.23 Official mysql:8.0.23 true 25h
97-
8.0.26 8.0.26 Official ghcr.io/kubedb/mysql:8.0.26 true 25h
98-
8.0.27 8.0.27 Official mysql:8.0.27 true 25h
99-
8.0.27-innodb 8.0.27 MySQL mysql/mysql-server:8.0.27 true 25h
100-
8.0.29 8.0.29 Official ghcr.io/appscode-images/mysql:8.0.29-oracle true 25h
101-
8.0.3 8.0.3 Official ghcr.io/kubedb/mysql:8.0.3 true 25h
102-
8.0.3-v1 8.0.3 Official ghcr.io/kubedb/mysql:8.0.3-v1 true 25h
103-
8.0.3-v2 8.0.3 Official ghcr.io/kubedb/mysql:8.0.3-v2 true 25h
104-
8.0.3-v3 8.0.3 Official mysql:8.0.3 true 25h
105-
8.0.3-v4 8.0.3 Official mysql:8.0.3 true 25h
106-
8.0.31 8.0.31 Official ghcr.io/appscode-images/mysql:8.0.31-oracle true 25h
107-
8.0.31-innodb 8.0.31 MySQL ghcr.io/appscode-images/mysql:8.0.31-oracle 25h
108-
8.0.32 8.0.32 Official ghcr.io/appscode-images/mysql:8.0.32-oracle true 25h
109-
8.0.35 8.0.35 Official ghcr.io/appscode-images/mysql:8.0.35-oracle 25h
110-
8.0.36 8.0.36 Official ghcr.io/appscode-images/mysql:8.0.36-debian 25h
111-
8.1.0 8.1.0 Official ghcr.io/appscode-images/mysql:8.1.0-oracle 25h
112-
8.2.0 8.2.0 Official ghcr.io/appscode-images/mysql:8.2.0-oracle 25h
113-
8.4.2 8.4.2 Official ghcr.io/appscode-images/mysql:8.4.2-oracle 25h
114-
8.4.3 8.4.3 Official ghcr.io/appscode-images/mysql:8.4.3-oracle 25h
115-
9.0.1 9.0.1 Official ghcr.io/appscode-images/mysql:9.0.1-oracle 25h
116-
9.1.0 9.1.0 Official ghcr.io/appscode-images/mysql:9.1.0-oracle 25h
53+
5.7.42-debian 5.7.42 Official ghcr.io/appscode-images/mysql:5.7.42-debian 12d
54+
5.7.44 5.7.44 Official ghcr.io/appscode-images/mysql:5.7.44-oracle 12d
55+
8.0.31-innodb 8.0.31 MySQL ghcr.io/appscode-images/mysql:8.0.31-oracle 12d
56+
8.0.35 8.0.35 Official ghcr.io/appscode-images/mysql:8.0.35-oracle 12d
57+
8.0.36 8.0.36 Official ghcr.io/appscode-images/mysql:8.0.36-debian 12d
58+
8.1.0 8.1.0 Official ghcr.io/appscode-images/mysql:8.1.0-oracle 12d
59+
8.2.0 8.2.0 Official ghcr.io/appscode-images/mysql:8.2.0-oracle 12d
60+
8.4.2 8.4.2 Official ghcr.io/appscode-images/mysql:8.4.2-oracle 12d
61+
8.4.3 8.4.3 Official ghcr.io/appscode-images/mysql:8.4.3-oracle 12d
62+
9.0.1 9.0.1 Official ghcr.io/appscode-images/mysql:9.0.1-oracle 12d
63+
9.1.0 9.1.0 Official ghcr.io/appscode-images/mysql:9.1.0-oracle 12d
11764
```
11865

119-
## Create a Mysql server
66+
## Create a Mysql Database
12067

121-
KubeDB implements a `Mysql` CRD to define the specification of a Mysql server. Below is the `Mysql`
68+
KubeDB implements a `MySQL` CRD to define the specification of a MySQL server. Below is the `MySQL`
12269
object created in this tutorial.
12370

12471
```yaml
@@ -145,7 +92,7 @@ $ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version"
14592
mysql.kubedb.com/mysql-quickstart created
14693
```
14794

148-
## Verify authentication
95+
##Create a Mysql Database
14996
The user can verify whether they are authorized by executing a query directly in the database. To
15097
do this, the user needs `username` and `password` in order to connect to the database. Below is an
15198
example showing how to retrieve the credentials from the Secret.
@@ -193,9 +140,9 @@ mysql> SHOW DATABASES;
193140
If you can access the data table and run queries, it means the secrets are working correctly.
194141
## Create RotateAuth MySQLopsrequest
195142

196-
#### 1. Using operator generated credentials:
143+
#### 1. Using Operator Generated Credentials:
197144

198-
In order to rotate authentication to the Mysql using operator generated, we have to create a
145+
In order to rotate authentication to the MySQL using operator generated, we have to create a
199146
`MySQLopsrequest` CR with `RotateAuth` type. Below is the YAML of the `MySQLopsrequest` CRO that
200147
we are going to create,
201148
```yaml
@@ -213,8 +160,8 @@ spec:
213160
```
214161
Here,
215162

216-
- `spec.databaseRef.name` specifies that we are performing rotate authentication operation on `mysql-quickstart` cluster.
217-
- `spec.type` specifies that we are performing `RotateAuth` on Mysql.
163+
- `spec.databaseRef.name` specifies that we are performing rotate authentication operation on `mysql-quickstart` instance.
164+
- `spec.type` specifies that we are performing `RotateAuth` on MySQL.
218165

219166
Let's create the `MySQLopsrequest` CR we have shown above,
220167
```shell
@@ -223,13 +170,13 @@ Let's create the `MySQLopsrequest` CR we have shown above,
223170
```
224171
Let's wait for `MySQLopsrequest` to be `Successful`. Run the following command to watch `MySQLopsrequest` CRO
225172
```shell
226-
$ kubectl get MySQLopsrequest -n demo
173+
$ kubectl get MySQLOpsRequest-n demo
227174
NAME TYPE STATUS AGE
228175
myops-rotate-auth-generated RotateAuth Successful 82s
229176
```
230177
If we describe the `MySQLopsrequest` we will get an overview of the steps that were followed.
231178
```shell
232-
$ kubectl describe MySQLopsrequest -n demo myops-rotate-auth-generated
179+
$ kubectl describe MySQLOpsRequest-n demo myops-rotate-auth-generated
233180
Name: myops-rotate-auth-generated
234181
Namespace: demo
235182
Labels: <none>
@@ -373,7 +320,7 @@ bash-5.1$
373320
374321
```
375322
The above output shows that the password has been changed successfully. The previous username & password is stored for rollback purpose.
376-
#### 2. Using user created credentials
323+
#### 2.Using User Created Credentials
377324

378325
At first, we need to create a secret with `kubernetes.io/basic-auth` type using custom password.
379326
Below is the command to create a secret with `kubernetes.io/basic-auth` type,
@@ -419,14 +366,14 @@ MySQLopsrequest.ops.kubedb.com/myops-rotate-auth-user created
419366
Let’s wait for `MySQLopsrequest` to be Successful. Run the following command to watch `MySQLopsrequest` CRO:
420367
421368
```shell
422-
$ kubectl get MySQLopsrequest -n demo
369+
$ kubectl get MySQLOpsRequest-n demo
423370
NAME TYPE STATUS AGE
424371
myops-rotate-auth-generated RotateAuth Successful 35m
425372
myops-rotate-auth-user RotateAuth Successful 2m18s
426373
```
427374
We can see from the above output that the `MySQLopsrequest` has succeeded. If we describe the `MySQLopsrequest` we will get an overview of the steps that were followed.
428375
```shell
429-
$ kubectl describe MySQLopsrequest -n demo myops-rotate-auth-user
376+
$ kubectl describe MySQLOpsRequest-n demo myops-rotate-auth-user
430377
Name: myops-rotate-auth-user
431378
Namespace: demo
432379
Labels: <none>
@@ -575,10 +522,10 @@ The above output shows that the password has been changed successfully. The prev
575522
## Cleaning up
576523
577524
To clean up the Kubernetes resources you can delete the CRD or namespace.
578-
Or, you can delete one by one resource by their name by this tutorial, run:
525+
Alternatively, you can delete individual resources by name. To do so, run:
579526
580527
```shell
581-
$ kubectl delete MySQLopsrequest myops-rotate-auth-generated myops-rotate-auth-user -n demo
528+
$ kubectl delete MySQLOpsRequestmyops-rotate-auth-generated myops-rotate-auth-user -n demo
582529
MySQLopsrequest.ops.kubedb.com "myops-rotate-auth-generated" "myops-rotate-auth-user" deleted
583530
$ kubectl delete secret -n demo mysql-quickstart-auth-user
584531
secret "mysql-quickstart-auth-user" deleted

0 commit comments

Comments
 (0)