Merge pull request #1098 from Bradamant3/small-reorg

reorganize get started for simplicity, clarity
This commit is contained in:
Andy Goldstein
2019-01-03 15:02:31 -05:00
committed by GitHub
2 changed files with 55 additions and 50 deletions

View File

@@ -1,8 +1,9 @@
## Getting started
The following example sets up the Ark server and client, then backs up and restores a sample application.
The following example sets up the Ark server and client, then backs up and restores a sample application.
For simplicity, the example uses Minio, an S3-compatible storage service that runs locally on your cluster.
For simplicity, the example uses Minio, an S3-compatible storage service that runs locally on your cluster.
For additional functionality with this setup, see the docs on how to [expose Minio outside your cluster][31].
**NOTE** The example lets you explore basic Ark functionality. Configuring Minio for production is out of scope.
@@ -37,7 +38,7 @@ brew install ark
### Set up server
These instructions start the Ark server and a Minio instance that is accessible from within the cluster only. See the following section for information about configuring your cluster for outside access to Minio. Outside access is required to access logs and run `ark describe` commands.
These instructions start the Ark server and a Minio instance that is accessible from within the cluster only. See [Expose Minio outside your cluster][31] for information about configuring your cluster for outside access to Minio. Outside access is required to access logs and run `ark describe` commands.
1. Start the server and the local storage service. In the Ark directory, run:
@@ -59,53 +60,6 @@ These instructions start the Ark server and a Minio instance that is accessible
kubectl get deployments --namespace=nginx-example
```
### (Optional) Expose Minio outside your cluster
When you run commands to get logs or describe a backup, the Ark server generates a pre-signed URL to download the requested items. To access these URLs from outside the cluster -- that is, from your Ark client -- you need to make Minio available outside the cluster. You can:
- Change the Minio Service type from `ClusterIP` to `NodePort`.
- Set up Ingress for your cluster, keeping Minio Service type `ClusterIP`.
In Ark 0.10, you can also specify the value of a new `publicUrl` field for the pre-signed URL in your backup storage config.
#### Expose Minio with Service of type NodePort
The Minio deployment by default specifies a Service of type `ClusterIP`. You can change this to `NodePort` to easily expose a cluster service externally if you can reach the node from your Ark client.
You must also get the Minio URL, which you can then specify as the value of the new `publicUrl` field in your backup storage config.
1. In `examples/minio/00-minio-deployment.yaml`, change the value of Service `spec.type` from `ClusterIP` to `NodePort`.
1. Get the Minio URL:
- if you're running Minikube:
```shell
minikube service minio --namespace=heptio-ark --url
```
- in any other environment:
1. Get the value of an external IP address or DNS name of any node in your cluster. You must be able to reach this address from the Ark client.
1. Append the value of the NodePort to get a complete URL. You can get this value by running:
```shell
kubectl -n heptio-ark get svc/minio -o jsonpath='{.spec.ports[0].nodePort}'
```
1. In `examples/minio/05-ark-backupstoragelocation.yaml`, uncomment the `publicUrl` line and provide this Minio URL as the value of the `publicUrl` field. You must include the `http://` or `https://` prefix.
#### Work with Ingress
Configuring Ingress for your cluster is out of scope for the Ark documentation. If you have already set up Ingress, however, it makes sense to continue with it while you run the example Ark configuration with Minio.
In this case:
1. Keep the Service type as `ClusterIP`.
1. In `examples/minio/05-ark-backupstoragelocation.yaml`, uncomment the `publicUrl` line and provide the URL and port of your Ingress as the value of the `publicUrl` field.
### Back up
1. Create a backup for any object that matches the `app=nginx` label selector:
@@ -214,6 +168,7 @@ kubectl delete -f config/minio/
kubectl delete -f config/nginx-app/base.yaml
```
[31]: expose-minio.md
[3]: install-overview.md
[18]: debugging-restores.md
[26]: https://github.com/heptio/ark/releases