{"id":15022568,"url":"https://github.com/puppetlabs/puppetlabs-kubernetes","last_synced_at":"2025-05-14T20:10:10.864Z","repository":{"id":25793758,"uuid":"102576190","full_name":"puppetlabs/puppetlabs-kubernetes","owner":"puppetlabs","description":"This module install and configures a Kubernetes cluster","archived":false,"fork":false,"pushed_at":"2025-02-06T12:04:24.000Z","size":2585,"stargazers_count":103,"open_issues_count":19,"forks_count":138,"subscribers_count":104,"default_branch":"main","last_synced_at":"2025-05-14T13:58:05.157Z","etag":null,"topics":["hacktoberfest","module","supported"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-06T07:19:28.000Z","updated_at":"2025-05-02T20:43:00.000Z","dependencies_parsed_at":"2024-01-22T14:58:35.069Z","dependency_job_id":"d11ba62a-b3f6-48a0-8ea0-f0c59c693f8e","html_url":"https://github.com/puppetlabs/puppetlabs-kubernetes","commit_stats":{"total_commits":549,"total_committers":104,"mean_commits":5.278846153846154,"dds":0.9089253187613844,"last_synced_commit":"213b03a2c5a97e863177f221186c40baf77d56e1"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetlabs-kubernetes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254219374,"owners_count":22034397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","module","supported"],"created_at":"2024-09-24T19:58:07.585Z","updated_at":"2025-05-14T20:10:10.847Z","avatar_url":"https://github.com/puppetlabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Puppet Forge](https://img.shields.io/puppetforge/v/puppetlabs/kubernetes.svg)](https://forge.puppetlabs.com/puppetlabs/kubernetes)\n[![Puppet Forge Downloads](http://img.shields.io/puppetforge/dt/puppetlabs/kubernetes.svg)](https://forge.puppetlabs.com/puppetlabs/kubernetes)\n\n# Kubernetes\n\n#### Table of Contents\n\n1. [Description](#description)\n2. [Setup - The basics of getting started with kubernetes](#setup)\n   * [Generating the module configuration](#generating-the-module-configuration)\n   * [Adding the OS and hostname yaml files to Hiera](#adding-the-`{$OS}.yaml`-and-`{$hostname}.yaml`-files-to-Hiera)\n   * [Configuring your node](#configuring-your-node)\n   * [Validating and unit testing the module](#validating-and-unit-testing-the-module)\n3. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n   * [Classes](#classes)\n   * [Defined types](#definedtypes)\n   * [Parameters](#parameters)\n4. [Limitations - OS compatibility, etc.](#limitations)\n5. [License](#license)\n6. [Development - Guide for contributing to the module](#development)\n7. [Examples - Puppet Bolt task examples](#examples)\n\n## Description\n\nThis module installs and configures [Kubernetes](https://kubernetes.io/) which is an open-source system for automating deployment, scaling, and management of containerized applications. For efficient management and discovery, containers that make up an application are grouped into logical units.\n\nTo bootstrap a Kubernetes cluster in a secure and extensible way, this module uses the [kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/) toolkit.\n\n## Setup\n\n[Install](https://puppet.com/docs/puppet/5.5/modules_installing.html) this module, [generate the configuration](#generating-the-module-configuration), [add the OS and hostname yaml files to Hiera](#adding-the-`{$OS}.yaml`-and-`{$hostname}.yaml`-files-to-Hiera), and [configure your node](#configuring-your-node).\n\nIncluded in this module is [Kubetool](https://github.com/puppetlabs/puppetlabs-kubernetes/blob/main/tooling/kube_tool.rb), a configuration tool that auto-generates the Hiera security parameters, the discovery token hash, and other configurations for your Kubernetes cluster. To simplify installation and use, the tool is available as a Docker image.\n\n### Generating the module configuration\n\nIf Docker is not installed on your workstation, install it from [here](https://docs.docker.com/install/).\n\nThe Kubetool Docker image takes each parameter as an environment variable.\n\n**Note:**: The version of Kubetool you use must match the version of the module on the Puppet Forge. For example, if using the module version 1.0.0, use `puppet/kubetool:1.0.0`.\n\nTo output a yaml file into your working directory that corresponds to the operating system you want Kubernetes to run on, and for each controller node, run either of these `docker run` commands:\n\n```console\ndocker run --rm -v $(pwd):/mnt --env-file env puppet/kubetool:{$module_version}\n```\n\nThe `docker run` command above includes an `env` file which is included in the root folder of this repo.\n\n```console\ndocker run --rm -v $(pwd):/mnt -e OS=ubuntu -e VERSION=1.10.2 -e CONTAINER_RUNTIME=docker -e CNI_PROVIDER=cilium -e CNI_PROVIDER_VERSION=1.4.3 -e ETCD_INITIAL_CLUSTER=kube-control-plane:172.17.10.101,kube-replica-control-plane-01:172.17.10.210,kube-replica-control-plane-02:172.17.10.220 -e ETCD_IP=\"%{networking.ip}\" -e KUBE_API_ADVERTISE_ADDRESS=\"%{networking.ip}\" -e INSTALL_DASHBOARD=true puppet/kubetool:{$module-version}\n```\n\nThe above parameters are:\n\n* `OS`: The operating system Kubernetes runs on.\n* `VERSION`: The version of Kubernetes to deploy. Must follow X.Y.Z format. ([Check kubeadm regex rule](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/util/version.go#L43) for more information)\n* `CONTAINER_RUNTIME`: The container runtime Kubernetes uses. Set this value to `docker` (officially supported) or `cri_containerd`. Advanced Kubernetes users can use `cri_containerd`, however this requires an increased understanding of Kubernetes, specifically when running applications in a HA cluster. To run a HA cluster and access your applications, an external load balancer is required in front of your cluster. Setting this up is beyond the scope of this module. For more information, see the Kubernetes [documentation](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/).\n* `CNI_PROVIDER`: The CNI network to install. Set this value to `weave`, `flannel`, `calico` or `cilium`.\n* `CNI_PROVIDER_VERSION` The CNI version to use. `calico`, `calico-tigera`, and `cilium` providers use this variable to reference the correct deployment file. Current version `cilium` is `1.4.3`, calico is `3.18`, calico-tigera is `3.26.0`\n* `ETCD_INITIAL_CLUSTER`: The server hostnames and IPs in the form of `hostname:ip`. When in production, include three, five, or seven nodes for etcd.\n* `ETCD_IP`: The IP each etcd member listens on. We recommend passing the fact for the interface to be used by the cluster.\n* `KUBE_API_ADVERTISE_ADDRESS`: The IP each etcd/apiserver instance uses on each controller. We recommend passing the fact for the interface to be used by the cluster.\n* `INSTALL_DASHBOARD`: A boolean which specifies whether to install the dashboard.\n* `KEY_SIZE`: Number of bits in certificates (default: `2048`).\n\nKubetool creates:\n\n* A yaml file that corresponds to the operating system specified by the `OS` parameter. To view the file contents, run `cat Debian.yaml` for a Debian system, or run `cat RedHat.yaml` for RedHat. The yaml files produced for each member of the etcd cluster contain certificate information to bootstrap an initial etcd cluster. Ensure these are also placed in your hieradata directory at the node level.\n\n* A discovery token hash and encoded values required by Kubernetes. To regenerate the values, including certificates and tokens, run the `kubetool` command again.\n\n### Adding the `{$OS}.yaml` and `{$hostname}.yaml` files to Hiera\n\nAdd the `{$OS}.yaml` file to the same [control repo](https://puppet.com/docs/pe/2018.1/control_repo.html) where your [Hiera](https://puppet.com/docs/hiera) data is, usually the `data` directory. By leveraging location facts, such as the [pp_datacenter](https://puppet.com/docs/puppet/5.5/ssl_attributes_extensions.html#reference-5482) [trusted fact](https://puppet.com/docs/puppet/5.5/lang_facts_and_builtin_vars.html#trusted-facts), each cluster can be allocated its own configuration.\n\n#### Possible Error fetching hiera data\n\nIf the below error is encounterd\n\n```console\nError: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Kubernetes]:\n  parameter 'api_server_count' expects an Integer value, got Undef\n  parameter 'token' expects a String value, got Undef\n  parameter 'discovery_token_hash' expects a String value, got Undef (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 138, column: 3) on node xxx.example.local\n```\n\nIt means that hiera is not getting the values from the associated yaml files stored in the [data folder](./data) so it sets some of the required values as Undefined.\n\nCheck your [hiera.yaml](./hiera.yaml) file and ensure that it contains entries for `{OS}.yaml` and `{$hostname}.yaml`\n\n```ruby\nhierarchy:\n  - name: \"Family\"\n    path: Debian.yaml\n  - name: \"Host\"\n    path: xxx.example.local.yaml  \n```\n\n### Configuring your node\n\nAfter the `{$OS}.yaml` and `{$hostname}.yaml` files have been added to the Hiera directory on your Puppet server, configure your node as the controller or worker.\n\nA controller node contains the control plane and etcd. In a production cluster, you should have three, five, or seven controllers. A worker node runs your applications. You can add as many worker nodes as Kubernetes can handle. For information about nodes in Kubernetes, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/architecture/nodes/#what-is-a-node).\n\n**Note:** A node cannot be a controller and a worker. It must be one or the other.\n\nTo make a node a controller, add the following code to the manifest:\n\n```puppet\nclass {'kubernetes':\n  controller =\u003e true,\n}\n```\n\nTo make a node a worker, add the following code to the manifest:\n\n```puppet\nclass {'kubernetes':\n  worker =\u003e true,\n}\n```\n\n#### Network Plugins\n\nKubernetes supports multiple [networking plugins](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) that implements the [networking model](https://kubernetes.io/docs/concepts/services-networking/#the-kubernetes-network-model).\n\nThis module supports following [Container Network Interface](https://github.com/containernetworking/cni) (CNI) plugins:\n\n- `flannel`\n```yaml\nkubernetes::cni_network_provider: https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml\nkubernetes::cni_pod_cidr: 10.244.0.0/16\nkubernetes::cni_provider: flannel\n```\n- `weave`\n- `calico-node`\n- `cilium`\n```yaml\nkubernetes::cni_network_provider: https://raw.githubusercontent.com/cilium/cilium/1.4.3/examples/kubernetes/1.26/cilium.yaml\nkubernetes::cni_pod_cidr: 10.244.0.0/16\nkubernetes::cni_provider: cilium\n```\n\n#### Installing Kubernetes on different OS\n\nCurrently, `puppetlab-kubernetes` is compatible with Ubuntu Xenial. For different OS, below parameters can be assigned.\n\nFor instance, installing `kubernetes` version `1.20.0` on Debian `buster`\n\n```puppet\n# Docker repo and key as documented in\n# https://docs.docker.com/install/linux/docker-ce/debian/\n  docker_apt_location =\u003e 'https://download.docker.com/linux/debian',\n  docker_apt_repos    =\u003e 'stable',\n  docker_apt_release  =\u003e 'buster',\n  docker_key_id       =\u003e '9DC858229FC7DD38854AE2D88D81803C0EBFCD88',\n  docker_key_source   =\u003e 'https://download.docker.com/linux/debian/gpg',\n# Different available version can be found by apt-cache madison docker-ce\n  docker_version =\u003e '5:20.10.5~3-0~debian-buster',\n  docker_package_name =\u003e 'docker-ce',\n# Kubernetes Version\n  kubernetes_version  =\u003e '1.20.0',\n```\n\n### Validating and unit testing the module\n\nThis module is compliant with the Puppet Development Kit [(PDK)](https://puppet.com/docs/pdk/1.x/pdk.html), which provides tools to help run unit tests on the module and validate the modules's metadata, syntax, and style.\n\n*Note:* To run static validations and\nunit tests against this module using the [`pdk validate`](https://puppet.com/docs/pdk/1.x/pdk_reference.html#pdk-validate-command) and [`pdk test unit`](https://puppet.com/docs/pdk/1.x/pdk_reference.html#pdk-test-unit-command) commands, you must have Puppet 5 or higher installed. In the following examples we have specified Puppet 5.3.6.\n\nTo validate the metadata.json file, run the following command:\n\n```console\npdk validate metadata --puppet-version='5.3.6'\n```\n\nTo validate the Puppet code and syntax, run the following command:\n\n```console\npdk validate puppet --puppet-version='5.3.6'\n```\n\n**Note:** The `pdk validate ruby` command ignores the excluded directories specified in the .rubocop.yml file. Therefore, to validate the Ruby code style and syntax you must specify the directory the code exists in.\n\nIn the following example we validate the Ruby code contained in the lib directory:\n\n```console\npdk validate ruby lib --puppet-version='5.3.6'\n```\n\nTo unit test the module, run the following command:\n\n```console\npdk test unit --puppet-version='5.3.6'\n```\n\n## Reference\n\n### Classes\n\n#### Public classes\n\n* kubernetes\n\n#### Private classes\n\n* kubernetes::cluster_roles\n* kubernetes::config\n* kubernetes::kube_addons\n* kubernetes::packages\n* kubernetes::repos\n* kubernetes::service\n\n### Defined types\n\n* kubernetes::kubeadm_init\n* kubernetes::kubeadm_join\n\n### Parameters\n\nThe following parameters are available in the `kubernetes` class.\n\n#### `apiserver_cert_extra_sans`\n\nA string array of Subject Alternative Names for the API server certificates.\n\nDefaults to `[]`.\n\n#### `apiserver_extra_arguments`\n\nA string array of extra arguments passed to the API server.\n\nDefaults to `[]`.\n\n#### `apiserver_extra_volumes`\n\nA hash of extra volumes mounts mounted on the API server.\n\nFor example,\n\n```puppet\napiserver_extra_volumes =\u003e {\n  'volume-name' =\u003e {\n    hostPath  =\u003e '/data',\n    mountPath =\u003e '/data',\n    readOnly: =\u003e 'false',\n    pathType: =\u003e 'DirectoryOrCreate'\n  },\n}\n```\n\nDefaults to `{}`.\n\n#### `cloud_provider`\n\nThe name of the cloud provider configured in `/etc/kubernetes/cloud-config`.\n\n**Note**: This file is not managed within this module and must be present before bootstrapping the Kubernetes controller.\n\nDefaults to `undef`.\n\n#### `cloud_config`\n\nThe location of the cloud config file used by `cloud_provider`. For use with v1.12 and above.\n\n**Note**: This file is not managed within this module and must be present before bootstrapping the Kubernetes controller.\n\nDefaults to `undef`.\n\n#### `cni_network_provider`\n\nThe URL to get the CNI providers yaml file. `kube_tool` sets this value.\n\nDefaults to `undef`.\n\n#### `cni_rbac_binding`\n\nThe download URL for the cni providers rbac rules. Only for use with Calico.\n\nDefaults to `undef`.\n\n#### `cni_pod_cidr`\n\nSpecifies the overlay (internal) network range to use. This value is set by `kube_tool` per `CNI_PROVIDER`.\n\nDefaults to `undef`.\n\n#### `container_runtime`\n\nSpecifies the runtime that the Kubernetes cluster uses.\n\nValid values are `cri_containerd` or `docker`.\n\nDefaults to `docker`.\n\n#### `container_runtime_use_proxy`\n\nWhen set to true will cause the new proxy variables to be applied to the container runtime. Currently only implemented for Docker.\n\nValid values are `true`, `false`.\n\nDefaults to `false`.\n\n#### `controller`\n\nSpecifies whether to set the node as a Kubernetes controller.\n\nValid values are `true`, `false`.\n\nDefaults to `false`.\n\n#### `containerd_version`\n\nSpecifies the version of the containerd runtime the module installs.\n\nDefaults to `1.4.3`.\n\n### `containerd_install_method`\n\nThe method used to install containerd. Either `archive` or `package`.\n\nDefaults to `archive`.\n\n### `containerd_package_name`\n\nThe package name for containerd when `containerd_install_method` is `package`.\n\nDefaults to `containerd.io`\n\n#### `containerd_archive`\n\nThe name of the containerd archive.\n\nDefaults to `containerd-${containerd_version}.linux-amd64.tar.gz`.\n\n#### `containerd_source`\n\nThe download URL for the containerd archive.\n\nDefaults to `https://github.com/containerd/containerd/releases/download/v${containerd_version}/${containerd_archive}`.\n\n#### `containerd_plugins_registry`\n\nThe configuration for the image registries used by containerd.\n\nSee https://github.com/containerd/containerd/blob/master/docs/cri/registry.md\n\nDefaults to `{'docker.io' =\u003e {'mirrors' =\u003e {'endpoint' =\u003e 'https://registry-1.docker.io'}}}`.\n\nFor example,\n\n```puppet\n'containerd_plugins_registry' =\u003e {\n    'docker.io' =\u003e {\n        'mirrors' =\u003e {\n            'endpoint' =\u003e 'https://registry-1.docker.io'\n        },\n    },\n    'docker.private.example.com' =\u003e {\n        'mirrors' =\u003e {\n            'endpoint' =\u003e 'docker.private.example.com'\n        },\n        'tls' =\u003e {\n            'ca_file' =\u003e 'ca.pem',\n            'cert_file' =\u003e 'cert.pem',\n            'key_file' =\u003e 'key.pem',\n            'insecure_skip_verify' =\u003e true,\n        },\n        'auth' =\u003e {\n            'auth' =\u003e '1azhzLXVuaXQtdGVzdDpCQ0NwNWZUUXlyd3c1aUxoMXpEQXJnUT==',\n        },\n    },\n    'docker.private.example2.com' =\u003e {\n        'mirrors' =\u003e {\n            'endpoint' =\u003e 'docker.private.example2.com'\n        },\n        'tls' =\u003e {\n            'insecure_skip_verify' =\u003e true,\n        },\n        'auth' =\u003e {\n            'username' =\u003e 'user2',\n            'password' =\u003e 'secret2',\n        },\n    },\n}\n```\n\n### `containerd_sandbox_image`\n\nThe configuration for the image pause container.\n\nDefault `registry.k8s.io/pause:3.2`.\n\n### `containerd_socket`\n\nThe path to containerd GRPC socket.\n\nDefault: `/run/containerd/containerd.sock`\n\n#### `controller_address`\n\nThe IP address and port for the controller the worker node joins. For example `172.17.10.101:6443`.\n\nDefaults to `undef`.\n\n#### `controllermanager_extra_arguments`\n\nA string array of extra arguments passed to the controller manager.\n\nDefaults to `[]`.\n\n#### `controllermanager_extra_volumes`\n\nA hash of extra volumes mounts mounted on the controller manager container.\n\nFor example,\n\n```puppet\ncontrollermanager_extra_volumes =\u003e {\n  'volume-name' =\u003e {\n    hostPath  =\u003e '/data',\n    mountPath =\u003e '/data',\n    readOnly: =\u003e 'false',\n    pathType: =\u003e 'DirectoryOrCreate'\n  },\n}\n```\n\nDefaults to `{}`.\n\n#### `scheduler_extra_arguments`\n\nA string array of extra arguments passed to the scheduler.\n\nDefaults to `[]`.\n\n#### `create_repos`\n\nSpecifies whether to install the upstream Kubernetes and Docker repos.\n\nValid values are `true`, `false`.\n\nDefaults to `true`.\n\n#### `disable_swap`\n\nSpecifies whether to turn off swap setting. This is required for kubeadm.\n\nValid values are `true`, `false`.\n\nDefaults to `true`.\n\n#### `manage_kernel_modules`\n\nSpecifies whether to manage the kernel modules needed for kubernetes\n\nValid values are `true`, `false`.\n\nDefaults to `true`\n\n#### `manage_sysctl_settings`\n\nSpecifies whether to manage the the sysctl settings needed for kubernetes\n\nValid values are `true`, `false`.\n\nDefaults to `true`\n\n#### `discovery_token_hash`\n\nThe string used to validate to the root CA public key when joining a cluster. This value is created by `kubetool`.\n\nDefaults to `undef`.\n\n#### `docker_apt_location`\n\nThe APT repo URL for the Docker packages.\n\nDefaults to `https://apt.dockerproject.org/repo`.\n\n#### `docker_apt_release`\n\nThe release name for the APT repo for the Docker packages.\n\nDefaults to `'ubuntu-${::lsbdistcodename}'`.\n\n#### `docker_apt_repos`\n\nThe repos to install from the Docker APT url.\n\nDefaults to `main`.\n\n#### `docker_version`\n\nSpecifies the version of the Docker runtime to install.\n\nDefaults to:\n\n* `17.03.0.ce-1.el7.centos` on RedHat.\n* `17.03.0~ce-0~ubuntu-xenial` on Ubuntu.\n\n#### `docker_package_name`\n\nThe docker package name to download from an upstream repo.\n\nDefaults to `docker-engine`.\n\n#### `docker_key_id`\n\nThe gpg key for the Docker APT repo.\n\nDefaults to `'58118E89F3A912897C070ADBF76221572C52609D'`.\n\n#### `docker_key_source`\n\nThe URL for the Docker APT repo gpg key.\n\nDefaults to `https://apt.dockerproject.org/gpg`.\n\n#### `docker_yum_baseurl`\n\nThe YUM repo URL for the Docker packages.\n\nDefaults to `https://download.docker.com/linux/centos/7/x86_64/stable`.\n\n#### `docker_yum_gpgkey`\n\nThe URL for the Docker yum repo gpg key.\n\nDefaults to `https://download.docker.com/linux/centos/gpg`.\n\n#### `docker_storage_driver`\n\nThe storage driver for Docker (added to '/etc/docker/daemon.json')\n\nDefaults to `overlay2`.\n\n#### `docker_storage_opts`\n\nThe storage options for Docker (Array added to '/etc/docker/daemon.json')\n\nDefaults to `undef`.\n\n#### `docker_extra_daemon_config`\n\nExtra daemons options\n\nDefaults to `undef`.\n\n#### `etcd_version`\n\nSpecifies the version of etcd.\n\nDefaults to `3.1.12`.\n\n#### `etcd_archive`\n\nSpecifies the name of the etcd archive.\n\nDefaults to `etcd-v${etcd_version}-linux-amd64.tar.gz`.\n\n#### `etcd_source`\n\nThe download URL for the etcd archive.\n\nDefaults to `https://github.com/coreos/etcd/releases/download/v${etcd_version}/${etcd_archive}`.\n\n#### `etcd_install_method`\n\nThe method on how to install etcd. Can be either `wget` (using etcd_source) or `package` (using $etcd_package_name)\n\nDefaults to `wget`.\n\n#### `etcd_package_name`\n\nThe system package name for installing etcd\n\nDefaults to `etcd-server`.\n\n#### `etcd_hostname`\n\nSpecifies the name of the etcd instance.\n\nA Hiera is `kubernetes::etcd_hostname:\"%{::fqdn}\"`.\n\nDefaults to `$hostname`.\n\n#### `etcd_ip`\n\nSpecifies the IP address etcd uses for communications.\n\nA Hiera is `kubernetes::etcd_ip:\"%{networking.ip}\"`.\n\nDefaults to `undef`.\n\n#### `etcd_initial_cluster`\n\nInforms etcd on how many nodes are in the cluster.\n\nA Hiera example is `kubernetes::etcd_initial_cluster: kube-control-plane:172.17.10.101,kube-replica-control-plane-01:172.17.10.210,kube-replica-control-plane-02:172.17.10.220`.\n\nDefaults to `undef`.\n\n#### `etcd_initial_cluster_state`\n\nInforms etcd on the state of the cluster when starting. Useful for adding single nodes to a cluster. Allowed values are `new` or `existing`.\n\nDefaults to `new`\n\n#### `etcd_peers`\n\nSpecifies how etcd lists the peers to connect to the cluster.\n\nA Hiera example is `kubernetes::etcd_peers`:\n\n* 172.17.10.101\n* 172.17.10.102\n* 172.17.10.103\n\nDefaults to `undef`\n\n#### `etcd_ca_key`\n\nThe CA certificate key data for the etcd cluster. This value must be passed as string and not as a file.\n\nDefaults to `undef`.\n\n#### `etcd_ca_crt`\n\nThe CA certificate data for the etcd cluster. This value must be passed as string and not as a file.\n\nDefaults to `undef`.\n\n#### `etcdclient_key`\n\nThe client certificate key data for the etcd cluster. This value must be passed as string and not as a file.\n\nDefaults to `undef`.\n\n#### `etcdclient_crt`\n\nThe client certificate data for the etcd cluster. This value must be passed as string not as a file.\n\nDefaults to `undef`.\n\n#### `etcdserver_key`\n\nThe server certificate key data for the etcd cluster. This value must be passed as string not as a file.\n\nDefaults to `undef`.\n\n#### `etcdserver_crt`\n\nThe server certificate data for the etcd cluster . This value must be passed as string not as a file.\n\nDefaults to `undef`.\n\n#### `etcdpeer_crt`\n\nThe peer certificate data for the etcd cluster. This value must be passed as string not as a file.\n\nDefaults to `undef`.\n\n#### `etcdpeer_key`\n\nThe peer certificate key data for the etcd cluster. This value must be passed as string not as a file.\n\nDefaults to `undef`.\n\n#### `http_proxy`\n\nThe string value to set for the HTTP_PROXY environment variable.\n\nDefaults to `undef`.\n\n#### `https_proxy`\n\nThe string value to set for the HTTPS_PROXY environment variable.\n\nDefaults to `undef`.\n\n#### image_repository\n\nThe container registry to pull control plane images from.\n\nDefaults to registry.k8s.io\n\n#### `install_dashboard`\n\nSpecifies whether the Kubernetes dashboard is installed.\n\nValid values are `true`, `false`.\n\nDefaults to `false`.\n\n#### `kubernetes_ca_crt`\n\nThe cluster's CA certificate. Must be passed as a string and not a file.\n\nDefaults to `undef`.\n\n#### `kubernetes_ca_key`\n\nThe cluster's CA key. Must be passed as a string and not a file.\n\nDefaults to `undef`.\n\n#### `kubernetes_front_proxy_ca_crt`\n\nThe cluster's front-proxy CA certificate. Must be passed as a string and not a file.\n\nDefaults to `undef`.\n\n#### `kubernetes_front_proxy_ca_key`\n\nThe cluster's front-proxy CA key. Must be passed as a string and not a file.\n\nDefaults to `undef`.\n\n#### `kube_api_advertise_address`\n\nThe IP address you want exposed by the API server.\n\nA Hiera example is `kubernetes::kube_api_advertise_address:\"%{networking.ip}\"`.\n\nDefaults to `undef`.\n\n#### `kubernetes_version`\n\nThe version of the Kubernetes containers to install. Must follow X.Y.Z format.\n\nDefaults to  `1.10.2`.\n\n#### `kubernetes_package_version`\n\nThe version the Kubernetes OS packages to install, such as `kubectl` and `kubelet`.\n\nDefaults to `1.10.2`.\n\n#### `kubeadm_extra_config`\n\nA hash containing extra configuration data to be serialised with `to_yaml` and appended to the config.yaml file used by kubeadm.\n\nDefaults to `{}`.\n\n#### `kubelet_extra_config`\n\nA hash containing extra configuration data to be serialised with `to_yaml` and appended to Kubelet configuration file for the cluster. Requires DynamicKubeletConfig.\n\nDefaults to `{}`.\n\n#### `kubelet_extra_arguments`\n\nA string array to be appended to kubeletExtraArgs in the Kubelet's nodeRegistration configuration. It is applied to both control-planes and nodes. Use this for critical Kubelet settings such as `pod-infra-container-image` which may be problematic to configure via kubelet_extra_config and DynamicKubeletConfig.\n\nDefaults to `[]`.\n\n#### `kubernetes_apt_location`\n\nThe APT repo URL for the Kubernetes packages.\n\nDefaults to `https://apt.kubernetes.io`.\n\n#### `kubernetes_apt_release`\n\nThe release name for the APT repo for the Kubernetes packages.\n\nDefaults to `'kubernetes-${::lsbdistcodename}'`.\n\n#### `kubernetes_apt_repos`\n\nThe repos to install using the Kubernetes APT URL.\n\nDefaults to `main`.\n\n#### `kubernetes_key_id`\n\nThe gpg key for the Kubernetes APT repo.\n\nDefaults to `'54A647F9048D5688D7DA2ABE6A030B21BA07F4FB'`.\n\n#### `kubernetes_key_source`\n\nThe URL for the APT repo gpg key.\n\nDefaults to `https://packages.cloud.google.com/apt/doc/apt-key.gpg`.\n\n#### `kubelet_use_proxy`\n\nWhen set to true will cause the new proxy variables to be applied to the Kubelet.\n\nValid values are `true`, `false`.\n\nDefaults to `false`.\n\n#### `kubernetes_yum_baseurl`\n\nThe YUM repo URL for the Kubernetes packages.\n\nDefaults to `https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64`.\n\n#### `kubernetes_yum_gpgkey`\n\nThe URL for the Kubernetes yum repo gpg key.\n\nDefaults to `https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg`.\n\n#### `manage_docker`\n\nSpecifies whether to install Docker repositories and packages via this module.\n\nValid values are `true`, `false`.\n\nDefaults to `true`.\n\n#### `manage_etcd`\n\nSpecifies whether to install an external Etcd via this module.\n\nValid values are `true`, `false`.\n\nDefaults to `true`.\n\n#### `no_proxy`\n\nThe string value to set for the NO_PROXY environment variable.\n\nDefaults to `undef`.\n\n#### `node_label`\n\nAn override to the label of a node.\n\nDefaults to `hostname`.\n\n#### `node_extra_taints`\n\nAdditional taints for node.\nDefaults to `undef`.\n\nFor example,\n\n```puppet\n  [{'key' =\u003e 'dedicated','value' =\u003e 'NewNode','effect' =\u003e 'NoSchedule', 'operator', =\u003e 'Equal'}]\n```\n\nAbout kubernetes taints `https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/`\n\n#### `runc_source`\n\nThe download URL for `runc`.\n\nDefaults to `https://github.com/opencontainers/runc/releases/download/v${runc_version}/runc.amd64`.\n\n#### `runc_version`\n\nSpecifies the version of `runc` to install.\n\nDefaults to `1.0.0`.\n\n#### `sa_key`\n\nThe key for the service account. This value must be a certificate value and not a file.\n\nDefaults to `undef`.\n\n#### `sa_pub`\n\nThe public key for the service account. This value must be a certificate value and not a file.\n\nDefaults to `undef`.\n\n#### `schedule_on_controller`\n\nSpecifies whether to remove the control plane role and allow pod scheduling on controllers.\n\nValid values are `true`, `false`.\n\nDefaults to `false`.\n\n#### `service_cidr`\n\nThe IP address range for service VIPs.\n\nDefaults to `10.96.0.0/12`.\n\n#### `token`\n\nThe string used to join nodes to the cluster. This value must be in the form of `[a-z0-9]{6}.[a-z0-9]{16}`.\n\nDefaults to `undef`.\n\n#### `ttl_duration`\n\nThe duration before the bootstrap token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire\n\nDefaults to `24h`\n\n#### `worker`\n\nSpecifies whether to set the node as a Kubernetes worker.\n\nValid values are `true`, `false`.\n\nDefaults to `false`.\n\n## Limitations\n\nThis module supports:\n\n* Puppet 4 or higher.\n* Kubernetes [1.10.x](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160) or higher.\n* Ruby 2.3.0 or higher.\n\nThis module has been tested on the following operating systems:\n\n* RedHat 7.x.\n* CentOS 7.x.\n* Ubuntu 16.04\n\nDocker is the supported container runtime for this module.\n\n## License\n\nThis codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of [AGPL](https://opensource.org/license/agpl-v3/), [BSD-2](https://opensource.org/license/bsd-2-clause/), [BSD-3](https://opensource.org/license/bsd-3-clause/), [GPL2.0](https://opensource.org/license/gpl-2-0/), [LGPL](https://opensource.org/license/lgpl-3-0/), [MIT](https://opensource.org/license/mit/) and [MPL](https://opensource.org/license/mpl-2-0/) Licensing.\n\n## Development\n\nIf you would like to contribute to this module, please follow the rules in the [CONTRIBUTING.md](https://github.com/puppetlabs/puppetlabs-kubernetes/blob/main/CONTRIBUTING.md). For more information, see our [module contribution guide.](https://puppet.com/docs/puppet/latest/contributing.html)\n\nTo run the acceptance tests you can use Puppet Litmus with the Vagrant provider by using the following commands:\n\n```console\n# install rvm with and ruby \u003e2.5\nrvm install \"ruby-2.5.1\"\ngem install bundler\nbundler install\nbundle exec rake 'litmus:provision_list[all_supported]'\nbundle exec rake 'litmus:install_agent[puppet5]'\nbundle exec rake 'litmus:install_module'\nbundle exec rake 'litmus:acceptance:parallel'\n```\n\nFor more information about Litmus please see [the wiki](https://github.com/puppetlabs/puppet_litmus/wiki).\n\nAs currently Litmus does not allow memory size and cpu size parameters for the Vagrant provisioner task we recommend to manually update the Vagrantfile used by the provisioner and add at least the following specifications for the puppetlabs-kubernetes module acceptance tests:\n\n**Update Vagrantfile in the file: spec/fixtures/modules/provision/tasks/vagrant.rb**\n```\n    vf = \u003c\u003c-VF \n    Vagrant.configure(\\\"2\\\") do |config|\n    config.vm.box = '#{platform}'\n    config.vm.boot_timeout = 600\n    config.ssh.insert_key = false\n    config.vm.hostname = \"testkube\"\n    config.vm.provider \"virtualbox\" do |vb|\n    vb.memory = \"2048\"\n    vb.cpus = \"2\"\n    end\n    #{network}\n    #{synced_folder}\n    end\n    VF\n```\n\n## Examples\n\nIn the examples folder you will find a [bash script](https://github.com/puppetlabs/puppetlabs-kubernetes/blob/main/examples/task_examples.sh) containg a few sample Puppet Bolt commands for the usage of the tasks. The example script is intended to be used with a Kubernetes API that requires the token authentication header, but the token parameter is optional by default.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-kubernetes/lists"}