Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kubernetes node sizes Data Source and lists in civo_kubernetes_cluster example #54

Merged
merged 1 commit into from
Aug 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/resources/kubernetes_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ Provides a Civo Kubernetes cluster resource. This can be used to create, delete,
## Example Usage

```hcl
data "civo_instances_size" "small" {
filter {
key = "type"
values = ["kubernetes"]
}

sort {
key = "ram"
direction = "asc"
}
}

resource "civo_kubernetes_cluster" "my-cluster" {
name = "my-cluster"
Expand All @@ -22,6 +33,25 @@ resource "civo_kubernetes_cluster" "my-cluster" {
}
```

## Node Sizes

Apart from using Data Source to find `target_nodes_size`, you can also use [Civo CLI](https://github.com/civo/cli) to list all Kubernetes node sizes.

```
$ civo kubernetes sizes

+----------------+-------------+------------+-----+-------+-----+------------+
| Name | Description | Type | CPU | RAM | SSD | Selectable |
+----------------+-------------+------------+-----+-------+-----+------------+
| g3.k3s.xsmall | Extra Small | Kubernetes | 1 | 1024 | 15 | Yes |
| g3.k3s.small | Small | Kubernetes | 1 | 2048 | 15 | Yes |
| g3.k3s.medium | Medium | Kubernetes | 2 | 4096 | 15 | Yes |
| g3.k3s.large | Large | Kubernetes | 4 | 8192 | 15 | Yes |
| g3.k3s.xlarge | Extra Large | Kubernetes | 6 | 16384 | 15 | Yes |
| g3.k3s.2xlarge | 2X Large | Kubernetes | 8 | 32768 | 15 | Yes |
+----------------+-------------+------------+-----+-------+-----+------------+
```

### Kubernetes Terraform Provider Example

The cluster's kubeconfig is exported as an attribute allowing you to use it with the [Kubernetes Terraform provider](https://www.terraform.io/docs/providers/kubernetes/index.html). For example:
Expand Down