- Have Kubernetes cluster up an running
- Have an active Google GCP account
The Operator expects you already have a BillingAccount in Google GCP cloud, a Parent Folder and a ServiceAccount. If not, then please follow these instructions to do it.
The Operator expects some pre-existing configuration into your Kubernetes cluster that is related to your account in Google GCP cloud. That configuration is:
- A
ConfigMap
gcp-project-operator: To use your Google billing account data - A
secret
gcp-project-operator-credentials: To utilize your Google ServiceAccount in order to be able to interact with instances.
Follow these instructions to create both the ConfigMap
and the secret
required, if you haven't done it already.
kubectl apply -f deploy/cluster_role_binding.yaml
kubectl apply -f deploy/cluster_role.yaml
kubectl apply -f deploy/service_account.yaml
kubectl create -f deploy/crds/gcp.managed.openshift.io_projectclaims_crd.yaml
kubectl create -f deploy/crds/gcp.managed.openshift.io_projectreferences_crd.yaml
kubectl apply -f deploy/operator.yaml
Create a new ProjectClaim
signaling your request to the Operator.
For example:
kubectl create -f deploy/crds/gcp.managed.openshift.io_v1alpha1_projectclaim_cr.yaml
Delete the already created ProjectClaim
instance.
This will propagate the request to Google GCP and it will delete the GCP Project that is linked to that.
kubectl delete -f deploy/crds/gcp.managed.openshift.io_v1alpha1_projectclaim_cr.yaml