Installing Crossplane with Yandex Cloud support
Crossplane
Getting started
-
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter. -
Create a service account with the
admin
role. It is required for Crossplane to run. -
Create a service account key and save it to the file:
yc iam key create --service-account-name <service_account_name> --output key.json
-
Make sure that the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If any rule is missing, add it.
Warning
The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.
Installation using Yandex Cloud Marketplace
- Go to the folder page
and select Managed Service for Kubernetes. - Click the name of the Managed Service for Kubernetes cluster you need and select the
Marketplace tab. - Under Application available for installation, select Crossplane with Yandex Cloud support and click Go to install.
- Configure the application:
- Namespace: Select a namespace for Crossplane or create a new one.
- Application name: Specify the app name.
- Service account key: Paste the contents of the service account key file you previously obtained, or create a new one.
- Click Install.
- Wait for the application to change its status to
Deployed
.
Installation using a Helm chart
-
Install Helm
v3.8.0 or higher. -
Install kubectl
and configure it to work with the created cluster. -
To install a Helm chart
with Crossplane, run the following command:helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/crossplane/crossplane \ --version 1.15.0 \ --untar && \ helm install \ --namespace <namespace> \ --create-namespace \ --set-file providerJetYC.creds=key.json \ crossplane ./crossplane/
Note
If you are using a Helm version below 3.8.0, append the
export HELM_EXPERIMENTAL_OCI=1 && \
string to the command to enable Open Container Initiative (OCI) support in the Helm client.
Installation using the Helm GitHub repository
-
Install Helm
v3.8.0 or higher. -
Install kubectl
and configure it to work with the created cluster. -
Create a namespace for Crossplane:
kubectl create namespace <namespace>
-
Add the Helm GitHub repository:
helm repo add crossplane-stable https://charts.crossplane.io/stable && \ helm repo update
-
Install Crossplane:
helm install crossplane --namespace crossplane-system crossplane-stable/crossplane
-
Make sure that Crossplane is installed and running:
helm list -n crossplane-system && \ kubectl get all -n crossplane-system
-
Install the Crossplane CLI:
curl --silent --location https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh && \ sudo mv kubectl-crossplane $(dirname $(which kubectl))
-
Install the provider:
kubectl crossplane install provider xpkg.upbound.io/yandexcloud/crossplane-provider-yc:v0.4.1
The current provider version is available in the GitHub repository
.