mirror of https://github.com/crossplane/docs.git
docs snapshot for crossplane version `master`
This commit is contained in:
parent
d282999974
commit
9a3ae000e9
|
@ -22,9 +22,9 @@ classes into a single unit that can be installed into your cluster as a
|
||||||
Let's take a look at installing a minimal stack for commonly used GCP resources.
|
Let's take a look at installing a minimal stack for commonly used GCP resources.
|
||||||
|
|
||||||
|
|
||||||
## Installing and Using the Minimal GCP Stack
|
## Installing and Using the GCP Sample Stack
|
||||||
|
|
||||||
[Minimal GCP](https://github.com/crossplane/stack-minimal-gcp) is a Crossplane
|
[GCP Sample Stack](https://github.com/crossplane/stack-gcp-sample) is a Crossplane
|
||||||
stack that includes the following managed resources:
|
stack that includes the following managed resources:
|
||||||
|
|
||||||
* `Network`
|
* `Network`
|
||||||
|
@ -42,7 +42,7 @@ provisioned `Network`, `Subnetwork`, etc.
|
||||||
* `CloudSQLInstanceClass`
|
* `CloudSQLInstanceClass`
|
||||||
* `CloudMemorystoreInstanceClass`
|
* `CloudMemorystoreInstanceClass`
|
||||||
|
|
||||||
The Minimal GCP stack will also create a `Provider` resource for us, so we can
|
The GCP sample stack will also create a `Provider` resource for us, so we can
|
||||||
go ahead and delete the one we have been using:
|
go ahead and delete the one we have been using:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -51,36 +51,36 @@ kubectl delete provider.gcp.crossplane.io gcp-provider
|
||||||
|
|
||||||
Now, similar to how we installed the GCP provider at the beginning, we can
|
Now, similar to how we installed the GCP provider at the beginning, we can
|
||||||
install a Crossplane stack with a `ClusterStackInstall`. Create the a file named
|
install a Crossplane stack with a `ClusterStackInstall`. Create the a file named
|
||||||
`stack-min-gcp.yaml` with the following content:
|
`stack-gcp-sample.yaml` with the following content:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: stacks.crossplane.io/v1alpha1
|
apiVersion: stacks.crossplane.io/v1alpha1
|
||||||
kind: ClusterStackInstall
|
kind: ClusterStackInstall
|
||||||
metadata:
|
metadata:
|
||||||
name: minimal-gcp
|
name: stack-gcp-sample
|
||||||
namespace: crossplane-system
|
namespace: crossplane-system
|
||||||
spec:
|
spec:
|
||||||
package: crossplane/stack-minimal-gcp:master
|
package: crossplane/stack-gcp-sample:master
|
||||||
```
|
```
|
||||||
|
|
||||||
Then create it in your cluster:
|
Then create it in your cluster:
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -f stack-min-gcp.yaml
|
kubectl apply -f stack-gcp-sample.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
Creating this resource does not actually cause any of the resources listed above
|
Creating this resource does not actually cause any of the resources listed above
|
||||||
to be created. Instead it creates a
|
to be created. Instead it creates a
|
||||||
[CustomResourceDefinition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
|
[CustomResourceDefinition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
|
||||||
in your cluster that allows you to repeatedly create instance of the environment
|
in your cluster that allows you to repeatedly create instance of the environment
|
||||||
defined by the stack. To create an instance of the Minimal GCP stack, create a
|
defined by the stack. To create an instance of the GCP sample stack, create a
|
||||||
file named `my-min-gcp.yaml` with the following content:
|
file named `my-gcp.yaml` with the following content:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: gcp.resourcepacks.crossplane.io/v1alpha1
|
apiVersion: gcp.stacks.crossplane.io/v1alpha1
|
||||||
kind: MinimalGCP
|
kind: GCPSample
|
||||||
metadata:
|
metadata:
|
||||||
name: my-min-gcp
|
name: my-gcp
|
||||||
spec:
|
spec:
|
||||||
region: us-west2
|
region: us-west2
|
||||||
projectID: <your-project-id> # replace with the project ID you created your Provider with earlier
|
projectID: <your-project-id> # replace with the project ID you created your Provider with earlier
|
||||||
|
@ -93,11 +93,11 @@ spec:
|
||||||
Then create the instance:
|
Then create the instance:
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -f my-min-gcp.yaml
|
kubectl apply -f my-gcp.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
Crossplane will immediately create the managed resources and classes that are
|
Crossplane will immediately create the managed resources and classes that are
|
||||||
part of the Minimal GCP stack.
|
part of the GCP sample stack.
|
||||||
|
|
||||||
Now that we have general set of infrastructure and classes defined in our
|
Now that we have general set of infrastructure and classes defined in our
|
||||||
cluster, it is time to deploy some applications. In the [previous
|
cluster, it is time to deploy some applications. In the [previous
|
||||||
|
@ -116,5 +116,5 @@ if you do not intend to go through the next section and would like to clean up
|
||||||
the resources created in this section, run the following command:
|
the resources created in this section, run the following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl delete -f my-min-gcp.yaml
|
kubectl delete -f my-gcp.yaml
|
||||||
```
|
```
|
||||||
|
|
|
@ -29,8 +29,8 @@ in your cluster.
|
||||||
The steps for using a Crossplane application involve defining your
|
The steps for using a Crossplane application involve defining your
|
||||||
infrastructure, installing the application, then creating an instance of that
|
infrastructure, installing the application, then creating an instance of that
|
||||||
application. In the [previous section](6_stack.md), we completed the first step
|
application. In the [previous section](6_stack.md), we completed the first step
|
||||||
by creating our `MinimalGCP` instance. In contrast to the GCP provider and
|
by creating our `GCPSample` instance. In contrast to the GCP provider and
|
||||||
Minimal GCP stack, the Wordpress application will be installed with a
|
GCP sample stack, the Wordpress application will be installed with a
|
||||||
`StackInstall` instead of a `ClusterStackInstall`. This means that the
|
`StackInstall` instead of a `ClusterStackInstall`. This means that the
|
||||||
installation will only be available in the namespace that we specify. You can
|
installation will only be available in the namespace that we specify. You can
|
||||||
read more about the difference between the two in the [infrastructure
|
read more about the difference between the two in the [infrastructure
|
||||||
|
@ -90,7 +90,7 @@ kubectl -n cp-quickstart get kubernetesclusters
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME STATUS CLASS-KIND CLASS-NAME RESOURCE-KIND RESOURCE-NAME AGE
|
NAME STATUS CLASS-KIND CLASS-NAME RESOURCE-KIND RESOURCE-NAME AGE
|
||||||
my-wordpress-cluster GKEClusterClass my-min-gcp-gkeclusterclass GKECluster cp-quickstart-my-wordpress-cluster-jxftn 19s
|
my-wordpress-cluster GKEClusterClass my-gcp-gkeclusterclass GKECluster cp-quickstart-my-wordpress-cluster-jxftn 19s
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -99,7 +99,7 @@ kubectl -n cp-quickstart get mysqlinstances
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME STATUS CLASS-KIND CLASS-NAME RESOURCE-KIND RESOURCE-NAME AGE
|
NAME STATUS CLASS-KIND CLASS-NAME RESOURCE-KIND RESOURCE-NAME AGE
|
||||||
my-wordpress-sql CloudSQLInstanceClass my-min-gcp-cloudsqlinstanceclass-mysql CloudSQLInstance cp-quickstart-my-wordpress-sql-vz9r7 30s
|
my-wordpress-sql CloudSQLInstanceClass my-gcp-cloudsqlinstanceclass-mysql CloudSQLInstance cp-quickstart-my-wordpress-sql-vz9r7 30s
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -198,5 +198,5 @@ following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl delete -f my-wordpress.yaml
|
kubectl delete -f my-wordpress.yaml
|
||||||
kubectl delete -f my-min-gcp.yaml
|
kubectl delete -f my-gcp.yaml
|
||||||
```
|
```
|
||||||
|
|
|
@ -49,10 +49,9 @@ Crossplane is comprised of four main components:
|
||||||
3. **Stacks**: a bundled set of custom resources that together represent an
|
3. **Stacks**: a bundled set of custom resources that together represent an
|
||||||
environment on a cloud provider. The bundle of instances can be created by a
|
environment on a cloud provider. The bundle of instances can be created by a
|
||||||
single custom resource.
|
single custom resource.
|
||||||
- Examples: [Stack Minimal
|
- Examples: [Sample GCP Stack](https://github.com/crossplane/stack-gcp-sample),
|
||||||
GCP](https://github.com/crossplane/stack-minimal-gcp), [Stack Minimal
|
[Sample AWS Stack](https://github.com/crossplane/stack-aws-sample),
|
||||||
AWS](https://github.com/crossplane/stack-minimal-aws), [Stack Minimal
|
[Sample Azure Stack](https://github.com/crossplane/stack-azure-sample)
|
||||||
Azure](https://github.com/crossplane/stack-minimal-azure)
|
|
||||||
4. **Applications**: a deployable unit of code and configuration, which, when
|
4. **Applications**: a deployable unit of code and configuration, which, when
|
||||||
created, may involve provisioning new services which are managed by a
|
created, may involve provisioning new services which are managed by a
|
||||||
`provider`, or consuming services created by a `stack`.
|
`provider`, or consuming services created by a `stack`.
|
||||||
|
|
Loading…
Reference in New Issue