Create, update and delete digitalocean kubernetes clusters.
Use this resource by adding the following to
the resource_types section of a pipeline config:
---
resource_types:
- name: kubernetes-resource
type: docker-image
source:
repository: kdihalas/do-kubernetes-resource
See concourse docs for more details
on adding resource_types to a pipeline config.
Check communicates with the Digitalocean API to make sure that your configuration works.
---
resources:
- name: cluster
type: kubernetes-resource
source:
token: 17365b6cf3b3586b6a....
region: lon1
tags:
- ci
node_pools:
- name: worker-pool
size: "s-1vcpu-2gb"
count: 1
tags:
- worker
token: Required. Digitalocean token with read/write access. You can read
how to create one here.
region: Required. Set the region in which you want to deploy the kubernetes cluster.
tags: Required. A list of tags for the cluster.
node_pools: Required A list with the node pools you want to deploy for your cluster.
name: Required. Name of the node pool.
size: Required. Size of the nodes in the node pool.
count: Required. How many of them you want to deploy.
tags: Required. A list of tags for the nodes in the node pool.
in: Get a new kubernetes clusterProvision a new cluster in Digitalocean and it will save the cluster ID and the cluster kubeconfig under the resource directory.
---
resources:
- name: cluster
type: kubernetes-resource
source:
token: 17365b6cf3b3586b6a....
region: lon1
tags:
- ci
node_pools:
- name: worker-pool
size: "s-1vcpu-2gb"
count: 1
tags:
- worker
jobs:
- name: create-cluster
plan:
- get: cluster
params:
name: cluster1
version: 1.13.1-do.2
name: Required. Name of the cluster for digitalocean panel.
version: Required. Version of kubernetes cluster to deploy.
out: Update or delete a kubernetes clusterUpdate or delete a kubernetes cluster. Needs to be run after in since it depends in some artifacts generated by it
---
resources:
- name: cluster
type: kubernetes-resource
source:
token: 17365b6cf3b3586b6a....
region: lon1
tags:
- ci
node_pools:
- name: worker-pool
size: "s-1vcpu-2gb"
count: 1
tags:
- worker
jobs:
- name: delete-cluster
plan:
- put: cluster
params:
name: cluster1
delete: true
get_params:
name: cluster1
skip: true
name: Required. Name of the cluster.
delete: Optional. If delete is true then the cluster will be deleted.
---
resources:
- name: cluster
type: kubernetes-resource
source:
token: 17365b6cf3b3586b6a....
region: lon1
tags:
- ci
node_pools:
- name: worker-pool
size: "s-1vcpu-2gb"
count: 1
tags:
- worker
jobs:
- name: scale-cluster
plan:
- put: cluster
params:
name: cluster1
node_pools:
- name: worker-pool
count: 3
get_params:
name: cluster1
skip: true
name: Required. Name of the cluster.
node_pools: Required A list with the node pools you want to update.
name: Required. Name of the node pool.
count: Optional. Number of nodes you want to scale to.
tags: Optional. A list of tags for the nodes in the node pool.
Content type
Image
Digest
Size
26 MB
Last updated
over 6 years ago
docker pull kdihalas/do-kubernetes-resource