This directory contains a set of tools to run end-to-end testing for kube-aws. It is composed of:
- Cluster creation using
kube-aws
- Kubernetes Conformance Tests
To run e2e tests, you should have set all he required env vars.
For convenience, creating .envrc
used by direnv
like as follows would be good.
export KUBE_AWS_KEY_NAME=...
export KUBE_AWS_KMS_KEY_ARN=arn:aws:kms:us-west-1:<account id>:key/<id>
export KUBE_AWS_DOMAIN=example.com
export KUBE_AWS_REGION=us-west-1
export KUBE_AWS_AVAILABILITY_ZONE=us-west-1b
export KUBE_AWS_HOSTED_ZONE_ID=...
export KUBE_AWS_AZ_1=...
export DOCKER_REPO=quay.io/mumoshu/
export SSH_PRIVATE_KEY=path/to/private/key/matching/key/name
Finally, run e2e tests like:
$ KUBE_AWS_CLUSTER_NAME=kubeawstest ./run all
Enable all the features including experimental ones:
KUBE_AWS_DEPLOY_TO_EXISTING_VPC=1 \
KUBE_AWS_SPOT_FLEET_ENABLED=1 \
KUBE_AWS_CLUSTER_AUTOSCALER_ENABLED=1 \
KUBE_AWS_NODE_POOL_INDEX=1 \
KUBE_AWS_WAIT_SIGNAL_ENABLED=1 \
KUBE_AWS_AWS_NODE_LABELS_ENABLED=1 \
KUBE_AWS_NODE_LABELS_ENABLED=1 \
KUBE_AWS_AWS_ENV_ENABLED=1 \
KUBE_AWS_USE_CALICO=true \
KUBE_AWS_CLUSTER_NAME=kubeawstest sh -c './run all'
KUBE_AWS_USE_CALICO=true \
KUBE_AWS_CLUSTER_NAME=kubeawstest sh -c './run all'
KUBE_AWS_CLUSTER_NAME=kubeawstest sh -c './run all'
KUBE_AWS_DEPLOY_TO_EXISTING_VPC=1 \
KUBE_AWS_USE_CALICO=true \
KUBE_AWS_CLUSTER_NAME=kubeawstest sh -c './run all'
The test cluster created by the e2e/run
script can be customized via various environment variables.
KUBE_AWS_DEPLOY_TO_EXISTING_VPC=1
: Set to 1
if you'd like the script to provision a VPC before running kube-aws and then deploying a kubernetes cluster to it.
KUBE_AWS_USE_CALICO=true
: Enable Calico throughout the cluster.
ETCD_COUNT=1
: Number of etcd nodes in the cluster. Defaults to 1. Set to an odd number greater than or equal to 3 for testing a H/A etcd cluster
ETCD_MEMBER_IDENTITY_PROVIDER=<eni|eip>
: "eni" for using secondary NICs=ENIs for etcd node=member identity. "eip" for using EIPs and Amazon DNS.
ETCD_INTERNAL_DOMAIN_NAME=internal.example.com
: Used only when ETCD_MEMBER_IDENTITY_PROVIDER
is set to "eni". See comments in cluster.yaml
for more details.
KUBE_AWS_CLUSTER_NAME=mycluster
: The name of a kube-aws main cluster i.e. a cloudformation stack for the main cluster. Must be unique in your AWS account.
LIMIT_SSH_ACCESS
: When set to a non-empty value, limit ssh access to all the nodes to be allowed from only your public IP.