mirror of https://github.com/crossplane/docs.git
docs snapshot for crossplane version `master`
This commit is contained in:
parent
eab8f2334d
commit
0682a3319c
|
@ -160,6 +160,14 @@ First, let's encode the credential file contents and put it in a variable:
|
||||||
BASE64ENCODED_GCP_ACCOUNT_CREDS=$(base64 crossplane-gcp-provider-key.json | tr -d "\n")
|
BASE64ENCODED_GCP_ACCOUNT_CREDS=$(base64 crossplane-gcp-provider-key.json | tr -d "\n")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Next, store the project ID of the GCP project in which you would like to
|
||||||
|
provision infrastructure as a variable:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# replace this with your own gcp project id
|
||||||
|
PROJECT_ID: my-cool-gcp-project
|
||||||
|
```
|
||||||
|
|
||||||
Now we’ll create the `Secret` resource that contains the credential, and
|
Now we’ll create the `Secret` resource that contains the credential, and
|
||||||
`Provider` resource which refers to that secret:
|
`Provider` resource which refers to that secret:
|
||||||
|
|
||||||
|
@ -181,7 +189,7 @@ metadata:
|
||||||
name: gcp-provider
|
name: gcp-provider
|
||||||
spec:
|
spec:
|
||||||
# replace this with your own gcp project id
|
# replace this with your own gcp project id
|
||||||
projectID: my-cool-gcp-project
|
projectID: ${PROJECT_ID}
|
||||||
credentialsSecretRef:
|
credentialsSecretRef:
|
||||||
namespace: crossplane-system
|
namespace: crossplane-system
|
||||||
name: gcp-account-creds
|
name: gcp-account-creds
|
||||||
|
@ -191,8 +199,9 @@ EOF
|
||||||
# apply it to the cluster:
|
# apply it to the cluster:
|
||||||
kubectl apply -f "provider.yaml"
|
kubectl apply -f "provider.yaml"
|
||||||
|
|
||||||
# delete the credentials variable
|
# delete the credentials and project id variables
|
||||||
unset BASE64ENCODED_GCP_ACCOUNT_CREDS
|
unset BASE64ENCODED_GCP_ACCOUNT_CREDS
|
||||||
|
unset PROJECT_ID
|
||||||
```
|
```
|
||||||
|
|
||||||
The output will look like the following:
|
The output will look like the following:
|
||||||
|
|
Loading…
Reference in New Issue