Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Neaj Morshad <[email protected]>
  • Loading branch information
Neaj-Morshad-101 committed Oct 25, 2024
1 parent d7be701 commit b86acd2
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions docs/guides/mssqlserver/restart/restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ KubeDB supports restarting the MSSQLServer database via a MSSQLServerOpsRequest.
namespace/demo created
```

> Note: YAML files used in this tutorial are stored in [docs/examples/postgres](https://github.com/kubedb/docs/tree/{{< param "info.version" >}}/docs/examples/postgres) folder in GitHub repository [kubedb/docs](https://github.com/kubedb/docs).
> Note: YAML files used in this tutorial are stored in [docs/examples/mssqlserver](https://github.com/kubedb/docs/tree/{{< param "info.version" >}}/docs/examples/mssqlserver) folder in GitHub repository [kubedb/docs](https://github.com/kubedb/docs).
## Deploy MSSQLServer

Expand All @@ -39,7 +39,7 @@ In this section, we are going to deploy a MSSQLServer database using KubeDB.
apiVersion: kubedb.com/v1
kind: MSSQLServer
metadata:
name: ha-postgres
name: ha-mssqlserver
namespace: demo
spec:
replicas: 3
Expand All @@ -58,8 +58,8 @@ spec:
Let's create the `MSSQLServer` CR we have shown above,

```bash
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/postgres/restart/postgres.yaml
postgres.kubedb.com/ha-postgres created
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/mssqlserver/restart/mssqlserver.yaml
mssqlserver.kubedb.com/ha-mssqlserver created
```

## Apply Restart opsRequest
Expand All @@ -73,22 +73,22 @@ metadata:
spec:
type: Restart
databaseRef:
name: ha-postgres
name: ha-mssqlserver
timeout: 3m
apply: Always
```

- `spec.type` specifies the Type of the ops Request
- `spec.databaseRef` holds the name of the MSSQLServer database. The db should be available in the same namespace as the opsRequest
- The meaning of `spec.timeout` & `spec.apply` fields can be found [here](/docs/guides/postgres/concepts/opsrequest.md)
- The meaning of `spec.timeout` & `spec.apply` fields can be found [here](/docs/guides/mssqlserver/concepts/opsrequest.md)

> Note: The method of restarting the standalone & cluster mode db is exactly same as above. All you need, is to specify the corresponding MSSQLServer name in `spec.databaseRef.name` section.

Let's create the `MSSQLServerOpsRequest` CR we have shown above,

```bash
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/postgres/restart/ops.yaml
postgresopsrequest.ops.kubedb.com/restart created
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/mssqlserver/restart/ops.yaml
mssqlserveropsrequest.ops.kubedb.com/restart created
```

Now the Ops-manager operator will first restart the general secondary pods and lastly will restart the Primary pod of the database.
Expand All @@ -106,7 +106,7 @@ kind: MSSQLServerOpsRequest
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"ops.kubedb.com/v1alpha1","kind":"MSSQLServerOpsRequest","metadata":{"annotations":{},"name":"restart","namespace":"demo"},"spec":{"apply":"Always","databaseRef":{"name":"ha-postgres"},"timeout":"3m","type":"Restart"}}
{"apiVersion":"ops.kubedb.com/v1alpha1","kind":"MSSQLServerOpsRequest","metadata":{"annotations":{},"name":"restart","namespace":"demo"},"spec":{"apply":"Always","databaseRef":{"name":"ha-mssqlserver"},"timeout":"3m","type":"Restart"}}
creationTimestamp: "2024-08-16T10:24:22Z"
generation: 1
name: restart
Expand All @@ -116,7 +116,7 @@ metadata:
spec:
apply: Always
databaseRef:
name: ha-postgres
name: ha-mssqlserver
timeout: 3m
type: Restart
status:
Expand Down Expand Up @@ -145,20 +145,20 @@ status:
status: "True"
type: EvictPod
- lastTransitionTime: "2024-08-16T10:24:31Z"
message: check pod ready; ConditionStatus:False; PodName:ha-postgres-1
message: check pod ready; ConditionStatus:False; PodName:ha-mssqlserver-1
observedGeneration: 1
status: "False"
type: CheckPodReady--ha-postgres-1
type: CheckPodReady--ha-mssqlserver-1
- lastTransitionTime: "2024-08-16T10:25:05Z"
message: check pod ready; ConditionStatus:True
observedGeneration: 1
status: "True"
type: CheckPodReady
- lastTransitionTime: "2024-08-16T10:25:05Z"
message: check replica func; ConditionStatus:False; PodName:ha-postgres-1
message: check replica func; ConditionStatus:False; PodName:ha-mssqlserver-1
observedGeneration: 1
status: "False"
type: CheckReplicaFunc--ha-postgres-1
type: CheckReplicaFunc--ha-mssqlserver-1
- lastTransitionTime: "2024-08-16T10:25:10Z"
message: check replica func; ConditionStatus:True
observedGeneration: 1
Expand Down Expand Up @@ -196,15 +196,15 @@ status:
status: "True"
type: UpdateOpsRequest
- lastTransitionTime: "2024-08-16T10:25:16Z"
message: check pod ready; ConditionStatus:False; PodName:ha-postgres-0
message: check pod ready; ConditionStatus:False; PodName:ha-mssqlserver-0
observedGeneration: 1
status: "False"
type: CheckPodReady--ha-postgres-0
type: CheckPodReady--ha-mssqlserver-0
- lastTransitionTime: "2024-08-16T10:26:00Z"
message: check replica func; ConditionStatus:False; PodName:ha-postgres-0
message: check replica func; ConditionStatus:False; PodName:ha-mssqlserver-0
observedGeneration: 1
status: "False"
type: CheckReplicaFunc--ha-postgres-0
type: CheckReplicaFunc--ha-mssqlserver-0
- lastTransitionTime: "2024-08-16T10:26:11Z"
message: Successfully completed the modification process.
observedGeneration: 1
Expand All @@ -222,19 +222,19 @@ status:
To cleanup the Kubernetes resources created by this tutorial, run:

```bash
kubectl delete postgresopsrequest -n demo restart
kubectl delete postgres -n demo ha-postgres
kubectl delete mssqlserveropsrequest -n demo restart
kubectl delete mssqlserver -n demo ha-mssqlserver
kubectl delete ns demo
```

## Next Steps

- Learn about [backup and restore](/docs/guides/postgres/backup/kubestash/overview/index.md) MSSQLServer database using Stash.
- Learn about initializing [MSSQLServer with Script](/docs/guides/postgres/initialization/script_source.md).
- Learn about [custom MSSQLServerVersions](/docs/guides/postgres/custom-versions/setup.md).
- Want to setup MSSQLServer cluster? Check how to [configure Highly Available MSSQLServer Cluster](/docs/guides/postgres/clustering/ha_cluster.md)
- Monitor your MSSQLServer database with KubeDB using [built-in Prometheus](/docs/guides/postgres/monitoring/using-builtin-prometheus.md).
- Monitor your MSSQLServer database with KubeDB using [Prometheus operator](/docs/guides/postgres/monitoring/using-prometheus-operator.md).
- Detail concepts of [MSSQLServer object](/docs/guides/postgres/concepts/postgres.md).
- Use [private Docker registry](/docs/guides/postgres/private-registry/using-private-registry.md) to deploy MSSQLServer with KubeDB.
- Learn about [backup and restore](/docs/guides/mssqlserver/backup/kubestash/overview/index.md) MSSQLServer database using Stash.
- Learn about initializing [MSSQLServer with Script](/docs/guides/mssqlserver/initialization/script_source.md).
- Learn about [custom MSSQLServerVersions](/docs/guides/mssqlserver/custom-versions/setup.md).
- Want to setup MSSQLServer cluster? Check how to [configure Highly Available MSSQLServer Cluster](/docs/guides/mssqlserver/clustering/ha_cluster.md)
- Monitor your MSSQLServer database with KubeDB using [built-in Prometheus](/docs/guides/mssqlserver/monitoring/using-builtin-prometheus.md).
- Monitor your MSSQLServer database with KubeDB using [Prometheus operator](/docs/guides/mssqlserver/monitoring/using-prometheus-operator.md).
- Detail concepts of [MSSQLServer object](/docs/guides/mssqlserver/concepts/mssqlserver.md).
- Use [private Docker registry](/docs/guides/mssqlserver/private-registry/using-private-registry.md) to deploy MSSQLServer with KubeDB.
- Want to hack on KubeDB? Check our [contribution guidelines](/docs/CONTRIBUTING.md).

0 comments on commit b86acd2

Please sign in to comment.