AWS provider
Install the AWS provider
Install the provider into the Kubernetes cluster with a Kubernetes configuration file.
The Crossplane Provider
Custom Resource Definition tells Kubernetes how to connect to the provider.
Verify the provider installed with kubectl get providers
.
A provider installs their own Kubernetes Custom Resource Definitions (CRDs). These CRDs allow you to create AWS resources directly inside Kubernetes.
You can view the new CRDs with kubectl get crds
. Every CRD maps to a unique AWS service Crossplane can provision and manage.
Create a Kubernetes secret for AWS
The provider requires credentials to create and manage AWS resources. Providers use a Kubernetes Secret to connect the credentials to the provider.
First generate a Kubernetes Secret from your AWS key-pair and then configure the Provider to use it.
Generate an AWS key-pair file
For basic user authentication, use an AWS Access keys key-pair file.
Create a text file containing the AWS account aws_access_key_id
and aws_secret_access_key
.
Save this text file as aws-credentials.txt
.
Create a Kubernetes secret with the AWS credentials
A Kubernetes generic secret has a name and contents. Use kubectl create secret
to generate the secret object named aws-secret
in the crossplane-system
namespace.
Use the --from-file=
argument to set the value to the contents of the aws-credentials.txt
file.
View the secret with kubectl describe secret
Create a ProviderConfig
A ProviderConfig
customizes the settings of the AWS Provider.
Apply the ProviderConfig
with the command:
This attaches the AWS credentials, saved as a Kubernetes secret, as a secretRef
.
The spec.credentials.secretRef.name
value is the name of the Kubernetes secret containing the AWS credentials in the spec.credentials.secretRef.namespace
.
Last updated