HUB
Sign inSign up

projectnebula/k8s-provisioner

By projectnebula

•Updated over 6 years ago

A task that creates and manages Kubernetes clusters in cloud platforms.

Image
0

1.9K

projectnebula/k8s-provisioner repository overview

⁠Kubernetes provisioner

The Kubernetes provisioner step container creates and manages Kubernetes clusters in cloud platforms.

Note: This task provisions resources in your cloud platform account. Deploying infrastructure creates real resources and could incur a charge from your cloud provider.

Current supported platforms:

  • Google Cloud Platform (GCP)
  • Amazon Web Services (AWS)

⁠Specifications

SettingChild settingData typeDescriptionDefaultRequired
providerstringThe cloud provider to use. Use aws or gcp.NoneTrue
projectstring The GCP project ID.NoneTrue for GCP
clusterNamestringA name for your cluster. This must be a fully qualified domain name (FQDN). You can use a root domain in route53 or GCP domain name service (DNS), or you can set the domain to k8s.local if you don't want to use one of your roots.NoneTrue
credentialsmappingA map of credentials used for platform authentication.NoneTrue
gcpServiceAccountFilestringThe GCP service account JSON. Pass the file contents to Nebula as a secret. See the example below.NoneTrue for GCP
awsAccessKeyIDstringThe AWS access key ID.NoneTrue for AWS
awsSecretAccessKeystringThe AWS secret access key.NoneTrue for AWS
sshPublicKeystringAn SSH public key to install on the virtual machine instances that run the cluster.NoneTrue for AWS
stateStoreNamestringA storage bucket name to store cluster state. This configuration uses the storage system of your cloud provider. AWS uses s3, GCP uses GS. If the bucket exists, the task tries to just use it. If the bucket does not exist, the task attempts to create the bucket. Multiple clusters can use the same state storage as long as the clusterName values are different.NoneTrue
masterCountintegerA count of how many master nodes to provision.1False
nodeCountintegerA count of how many agent nodes to provision.3False
zonesAn sequence of stringsAn sequence of zones in the cloud platform to run node instances in.NoneTrue (at least one)
regionstringA platform region to use when provisioning a cluster.NoneTrue

Note: The value you set for a secret must be a string. If you have multiple key-value pairs to pass into the secret, or your secret is the contents of a file, you must encode the values using base64 encoding, and use the encoded string as the secret value.

⁠Outputs

After a cluster is provisioned, Nebula stores the kubeconfig file as an output. Other steps in your workflow, like Kubectl or Helm can use the output to interact with the cluster.

KeyData type
kubeconfig-filestring

⁠Examples

Here is an example of the step in a Nebula workflow:

steps:

...

- name: k8s-provisioner
  image: projectnebula/k8s-provisioner:latest
  spec:
    provider: gcp
    project: my-project
    clusterName: my-cluster
    credentials:
      gcpServiceAccountFile: 
        $type: Secret
        name: credentials
    stateStoreName: my-bucket
    masterCount: 1
    nodeCount: 3
    zones: 
    - "us-west-2a"
    region: us-west2

Here is an example of how to call the kubeconfig file from another step in your workflow:

kubeconfig-file: 
  $type: Output
  name: kubeconfig-file
  taskName: k8s-provisioner
Tag summary
Recent tags
Content type
Image
Digest
Size
40.1 MB
Last updated
over 6 years ago
docker pull projectnebula/k8s-provisioner:latest