Skip to content

Latest commit

 

History

History

civo-portainer-k3s

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

civo-portainer-k3s

Example of running portainer-k8s on civo-k3s using pure terraform

Prerequisites

Steps:

  1. Clone repo: git clone git@github.com:jhole89/terraform-k8s-example.git

  2. Change to this directory: cd civo-portainer-k3s

  3. Initialise terraform: terraform init

  4. Copy tfvars template: cp terraform.tfvars.template terraform.tfvars

  5. Fill in terraform.tfvars with your Civo API key (found at https://www.civo.com/account/security)

  6. Apply terraform plan: terraform apply --auto-approve - you should see the following output

    module.cluster.civo_kubernetes_cluster.k3s: Creating...
    ...
    ...
    ...
    Apply complete! Resources: 6 added, 0 changed, 0 destroyed.
    
  7. Log into your Civo account and grab the dns name:

    Civo DNS

    Portainer will be published on port 9000: Portainer start screen

    Create the admin user and connect to the civo kubernetes cluster: Connect portainer to k8s

    You can now use portainer to deploy kubernetes applications into civo-k3s: Deploy Nginx

    Access Nginx

  8. Once no longer required you can remove all resources: terraform destroy --auto-approve