No description or website provided.
Switch branches/tags
Nothing to show
Clone or download

README.md

Kubernetes cluster-api-provider-aws Project

This repository hosts an implementation of a provider for AWS for the cluster-api project.

Note: This repository is currently a skeleton implementation of a cluster-api provider, implementation will begin once there is agreement on the Design Spec.

Development

Updating mocks

When you update the mocks, please make sure the imports are not from the dependencies vendor directory. Instead, make them an explicit dependency of this project.

For example, if you see types "sigs.k8s.io/cluster-api/vendor/k8s.io/apimachinery/pkg/types" in the import path, replace it with types "k8s.io/apimachinery/pkg/types".

Requirements

  • A Google Cloud project or 2 AWS Elastic Container Registry repositories

Set up

You can use Google Cloud or AWS ECR to host repositories.

Pushing development images to Google Cloud

  1. Install the gcloud cli
  2. Set project: gcloud config set project YOUR_PROJECT_NAME
  3. Pushing dev images: make dev_push

Pushing development images to AWS Elastic Container Registry

  1. Install the AWS CLI
  2. Install jq
  3. Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_DEFAULT_REGION variables
  4. Create two ECR repositories
aws ecr create-repository --repository-name aws-machine-controller
aws ecr create-repository --repository-name aws-cluster-controller
  1. Run eval $(aws ecr get-login --no-include-email) or use the ECR Credential Helper to set up Docker
  2. Push dev images with DEV_REPO_TYPE=ECR make dev_push

clusterctl

Using images on Google Cloud

export CLUSTER_CONTROLLER_IMAGE=gcr.io/YOUR_PROJECT_NAME/aws-cluster-controller:0.0.1-dev
export MACHINE_CONTROLLER_IMAGE=gcr.io/YOUR_PROJECT_NAME/aws-machine-controller:0.0.1-dev

Using images on Elastic Container Registry

export AWS_ACCOUNT_ID=$(aws sts get-caller-identity | jq -r .Account)
export CLUSTER_CONTROLLER_IMAGE=${AWS_ACCOUNT_ID}.dkr.ecr.${DEFAULT_AWS_REGION}.amazonaws.com/aws-cluster-controller:0.0.1-dev
export MACHINE_CONTROLLER_IMAGE=${AWS_ACCOUNT_ID}.dkr.ecr.${DEFAULT_AWS_REGION}.amazonaws.com/aws-machine-controller:0.0.1-dev

You will also need to configure minikube or your bootstrap cluster with credentials to access ECR, using image pull secrets or another mechanism.

Running clusterctl

  1. Generate the input files with clusterctl/examples/aws/generate-yaml.sh
  2. Instantiate the cluster
clusterctl create cluster -c clusterctl/examples/aws/out/cluster.yaml -m clusterctl/examples/aws/out/machines.yaml -p clusterctl/examples/aws/out/provider-components.yaml --provider aws

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.