Running –create-cluster-config command without any arguments defaults to Ubuntu. You can also run –create-cluster-config command with –ami-vm-os=ubuntu or –ami-vm-os=coreos commands and the following occurs.

A kubernetes.tf terraform file is generated in the same directory.

Passwordless SSH connection between the local workstation and the remote EC2 instances is established.

Note:

The script uses t2.micro instance for the worker nodes, which must be well within the Amazon Free Tier limits.

For process intensive containers you may have to modify the script to use m3.large instances, which could be charged.

Run the following command to verify successful installation of terraform.

$ terraform
Usage: terraform [--version] [--help] <command> [args]
The available commands for execution are listed below. The most common and useful
commands are shown first,followed by less common or more advanced commands. If you
are just getting started with Terraform, use the common commands. For other commands,
read the help and documentation before using them.
Common commands:
apply Builds or changes infrastructure
console Interactive console for Terraform interpolations
# ...

Run the terraform init command to initialize terraform.

Run the terraform plan command from the directory where the generated terraform file (.tf) is placed.

Terraform outputs a chunk of JSON data containing changes that would be applied on AWS.

You can either use an existing Kubernetes cluster or create a new one.
To create a new cluster, go to Google Cloud Platform -> Kubernetes Engine -> Create Kubernetes Cluster.

Minimum requirements for Kubernetes cluster are as follows:

Machine Type - (Minimum 2 vCPUs)

Node Image - (Ubuntu)

Size - (Minimum 3)

Cluster Version - (1.6.4+)

Note:

The example commands below were run on a Kubernetes cluster demo-openebs03 in zone us-central1-a with project unique ID strong-eon-153112. When you copy paste the command, ensure that you use the details from your project.

Go to Google Cloud Platform -> Compute Engine -> VM instances. The nodes displayed by default in this console are Compute Engine VMs, and you can see them in the console. The display is similar to the following screen.

Select the nodes and click SSH to see the iSCSI configuration.

Verify that iSCSI is configured

a. Check that initiator name is configured.

~$sudo cat /etc/iscsi/initiatorname.iscsi
## DO NOT EDIT OR REMOVE THIS FILE!
## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator. The InitiatorName must be unique
## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1993-08.org.debian:01:6277ea61267f

Before applying OpenEBS Operator, ensure that the administrator context for the cluster is set. The following procedure helps you setup the administrator context.

Setting up Kubernetes Cluster with Administrator Privileges

To create or modify service accounts and grant previleges, kubectl must be run with administrator previleges. The following commands help you set up and use the administrator context for Google Kubernetes Engine using the Google Cloud Shell.

a. Initialize credentials to allow kubectl to execute commands on the Kubernetes cluster.

Persistent storage is created from the space available on the nodes (default host directory : /var/openebs). Administrator is provided with additional options of consuming the storage (as outlined in openebs-config.yaml). These options will work hand-in-hand with the Kubernetes local storage manager once OpenEBS integrates them in future releases.