usage
Provide the AWS credentials in following ways:
Environment Variables. You will need to specify
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION.
Prerequisites
Familiarity with rke configuration.
Usage
Install
Modify values in
config.yaml.exampleinsiderkekey. Supported options as of now:
cluster_name - name of cluster
node_os - operating system for nodes. Currently, ubuntu
rke_aws_region - AWS region to install the cluster in.
authorization - authorization in cluster. Possible values: `rbac`, `none`. Recommended is `rbac`
rke_node_instance_type - instance type for nodes. t2.micro is highly discouraged.
node_count - number of nodes to launch in cluster
cloud_provisioner - cloud provisioner for rke cluster. Currently, only aws is supported.Example:
After appropriate values are filled, run:
Once the infrastructure and cluster is setup, kubeconfig file and rancher-cluster.yml file will be available at:
kubeconfig -
inventory/rke-tk8/provisioner/kube_config_cluster.ymlrancher config -
inventory/rke-tk8/provisioner/rancher-cluster.ymlNow you can use the same
kubeconfigfile to interact with kubernetes with kubectl and userancher-cluster.ymlto interact with cluster usingrkecli.
Note: Do not
mvthese files from this directory to somewhere else as these are stored in Terraform states. If required, make a copy.
Remove
For removing the rke cluster and keep the underlying infrastructure, run:
This is equivalent to rke remove --config rancher-cluster.yml.
Destroy
This will destroy the complete infrastructure. Run:
Note This is just a cluster provisioner, it will not install
rancher-2.xon the cluster by itself. Use
on the cluster.
Last updated