You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2021. It is now read-only.
The helm chart for the operator is [included in this git repo](../mysql-operator), run the following in the root of the checked out `mysql-operator` repo.
40
+
The helm chart for the operator is [included in this Git repository](../mysql-operator),
41
+
run the following in the root of the checked out `mysql-operator` repository.
43
42
44
-
To install the chart in a cluster without RBAC with the release name `my-release`:
43
+
To install the chart in a cluster without RBAC with the release name `mysql-operator`:
45
44
46
45
```console
47
-
$ helm install --name my-release mysql-operator
46
+
$ helm install \
47
+
--name mysql-operator \
48
+
mysql-operator
48
49
```
49
50
50
-
If your cluster has RBAC disabled then you will need to run:
If your cluster does not use RBAC (Role Based Access Control), you will need to
52
+
disable creation of RBAC resources by adding `--set rbac.enabled=false` to your
53
+
`helm install` command above.
55
54
56
-
The above command deploys the MySQL Operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
55
+
The above command deploys the MySQL Operator on the Kubernetes cluster in the
56
+
default configuration. The [configuration](#configuration) section lists the
57
+
parameters that can be configured during installation.
57
58
58
59
> **Tip**: List all releases using `helm list`
59
60
60
61
### Uninstalling the Chart
61
62
62
-
To uninstall/delete the `my-release` deployment:
63
+
To uninstall/delete the `mysql-operator` deployment:
63
64
64
65
```console
65
-
$ helm delete my-release
66
+
$ helm delete mysql-operator
66
67
```
67
68
68
-
The command removes all the Kubernetes components associated with the chart and deletes the release.
69
-
70
69
### Configuration
71
70
72
-
The following tables lists the configurable parameters of the MySQL-operator chart and their default values.
71
+
The following tables lists the configurable parameters of the MySQL-operator
72
+
chart and their default values.
73
73
74
74
Parameter | Description | Default
75
75
--------- | ----------- | -------
76
76
`rbac.enabled` | If true, enables RBAC | `true`
77
77
`operator.namespace` | Controls the namespace in which the operator is deployed | `mysql-operator`
78
+
`operator.global` | Controls whether the `mysql-operator` is installed in cluster-wide mode or in a single namespace | `true`
79
+
`image.tag` | The version of the mysql-operator to install | `0.1.1`
78
80
79
81
## Create a simple MySQL cluster
80
82
81
-
The first time you create a MySQL Cluster in a namespace you need to create the
83
+
The first time you create a MySQL Cluster in a namespace (other than in the
84
+
namespace into which you installed the mysql-operator) you need to create the
82
85
`mysql-agent` ServiceAccount and RoleBinding in that namespace:
83
86
84
-
```bash
87
+
```console
85
88
$ cat <<EOF | kubectl create -f -
86
89
apiVersion: v1
87
90
kind: ServiceAccount
@@ -105,26 +108,27 @@ subjects:
105
108
EOF
106
109
```
107
110
108
-
Now let's create a new MySQL cluster. Create a cluster.yaml file with the following contents
111
+
Now let's create a new MySQL cluster. Create a `cluster.yaml` file with the following contents:
109
112
110
113
```yaml
111
-
apiVersion: mysql.oracle.com/v1
114
+
apiVersion: mysql.oracle.com/v1alpha1
112
115
kind: Cluster
113
116
metadata:
114
-
name: myappdb
117
+
name: my-app-db
118
+
namespace: my-namespace
115
119
```
116
120
117
121
And create it with **kubectl**
118
122
119
-
```
123
+
```console
120
124
$ kubectl apply -f cluster.yaml
121
-
mysqlcluster "myappdb" created
125
+
mysqlcluster "my-app-db" created
122
126
```
123
127
124
128
You should now have a cluster in the default namespace
125
129
126
-
```
127
-
$ kubectl get mysqlclusters
130
+
```console
131
+
$ kubectl -n my-namespace get mysqlclusters
128
132
NAME KIND
129
133
myappdb Cluster.v1alpha1.mysql.oracle.com
130
134
```
@@ -133,18 +137,20 @@ To find out how to create larger clusters, and configure storage see [Clusters](
133
137
134
138
#### Verify that you can connect to MySQL
135
139
136
-
The first thing you need to do is fetch the MySQL root password which is auto-generated for us by default and stored ia secret named `<dbname>-root-password`
140
+
The first thing you need to do is fetch the MySQL root password which is
141
+
auto-generated for us by default and stored in a Secret named `<dbname>-root-password`
137
142
138
-
```
139
-
$ kubectl get secret myappdb-root-password -o jsonpath="{.data.password}" | base64 -D
0 commit comments