-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f8687e
commit ffb6fe3
Showing
1 changed file
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,57 @@ | ||
# Azure SQL Operator | ||
# Azure SQL Operator | ||
|
||
## Resources supported | ||
## Resources supported | ||
|
||
1. Azure SQL server | ||
2. SQL database | ||
3. SQL firewall rule | ||
4. Action (Rolling user credentials for the SQL server) | ||
1. Azure SQL server | ||
2. SQL database | ||
3. SQL firewall rule | ||
4. Action (Rolling user credentials for the SQL server) | ||
|
||
## Deploying SQL Resources | ||
## Deploying SQL Resources | ||
|
||
### Create a Resource Group | ||
### Create a Resource Group | ||
|
||
Create a resource group by running the following yaml file. Update the name variable to your preferred resource group name. | ||
Create a resource group by running the following yaml file. Update the name variable to your preferred resource group name. | ||
|
||
```kubectl create -f config/samples/azure_v1_resourcegroup.yaml``` | ||
```kubectl create -f config/samples/azure_v1_resourcegroup.yaml``` | ||
|
||
### Create SQL resources | ||
### Create SQL resources | ||
|
||
Create your SQL resources by running the following yaml files. Update the resource group name, and SQL resource names to your preferred names. | ||
Create your SQL resources by running the following yaml files. Update the resource group name, and SQL resource names to your preferred names. | ||
|
||
```kubectl create -f config/samples/azure_v1_sqldatabase.yaml``` | ||
```kubectl create -f config/samples/azure_v1_sqldatabase.yaml``` | ||
|
||
```kubectl create -f config/samples/azure_v1_sqlfirewallrule.yaml``` | ||
```kubectl create -f config/samples/azure_v1_sqlfirewallrule.yaml``` | ||
|
||
```kubectl create -f config/samples/azure_v1_sqlserver.yaml``` | ||
```kubectl create -f config/samples/azure_v1_sqlserver.yaml``` | ||
|
||
### View SQL Resources | ||
### View SQL Resources | ||
|
||
To view your created SQL resources, such as sqlserver, run the following command: | ||
To view your created SQL resources, such as sqlserver, run the following command: | ||
|
||
`k get sqlserver` | ||
`k get sqlserver` | ||
|
||
Your servers should be displayed with their name and age. | ||
Your servers should be displayed with their name and age. | ||
|
||
### Delete a SQL Resource | ||
### Delete a SQL Resource | ||
|
||
To delete an existing resource from Kubernetes and Azure, such as SQL server, run: | ||
To delete an existing resource from Kubernetes and Azure, such as SQL server, run: | ||
|
||
`k edit sqlserver $sqlservername` | ||
`k edit sqlserver $sqlservername` | ||
|
||
Remove the lines under the finalizer, and then delete the sql server instance: | ||
Remove the lines under the finalizer, and then delete the sql server instance: | ||
|
||
`k delete sqlserver $sqlservername` | ||
`k delete sqlserver $sqlservername` | ||
|
||
The following message should appear: | ||
The following message should appear: | ||
|
||
`sqlserver.azure.microsoft.com "$sqlservername" deleted.` | ||
`sqlserver.azure.microsoft.com "$sqlservername" deleted.` | ||
|
||
## Troubleshooting resource provisioning | ||
## Troubleshooting resource provisioning | ||
|
||
kubectl describe to see events | ||
kubectl describe to see events | ||
|
||
# How would you use the Azure SQL Operator from a real application | ||
# How would you use the Azure SQL Operator from a real application | ||
|
||
describe demo app | ||
|
||
describe demo app |