Skip to content
Ryan Tiffany edited this page Jul 20, 2023 · 1 revision

Welcome to the microk8s-ibmcloud-vpc wiki!

Here you will find instructions for running this code locally, or in a non-IBM Cloud Shell environment.

Pre-requisites

  • Recent version of Terraform installed. This guide was tested on terraform 1.5.3.
  • IBM Cloud API Key. If you do not have a key, you can follow this guide to create one.
  • A recent version of [Ansible] installed. This guide was tested on ansible 2.15.2.
  • (Optional) - [tfswitch] installed. The tfswitch utility allows you to run multiple versions of Terraform on the same system. If you do not have a particular version of terraform installed, tfswitch will download the version you select from an interactive menu.

tfswitch terraform selection


Getting Started

With the pre-req sorted, it is time to deploy the cluster.

  1. Clone this repo and cd into the microk8s-ibmcloud-vpc directory.

    git clone https://github.com/cloud-design-dev/microk8s-ibmcloud-vpc.git
    cd microk8s-ibmcloud-vpc
  2. Copy the tfvars-example to terraform.tfvars file and update the values as needed. See here for full list of variables.

    cp tfvars-example terraform.tfvars
  3. Initialize Terraform:

    terraform init -upgrade
  4. Run a Terraform plan:

    terraform plan -out "$(terraform workspace show).tfplan" 
  5. Run Terraform apply:

    terraform apply "$(terraform workspace show).tfplan"
Clone this wiki locally