You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,23 @@ It groups containers that make up an application into logical units for easy man
28
28
29
29
### Setup Requirements
30
30
31
-
The included configuration tool,`kube_tools` auto generates all the security parameters, the bootstrap token, and other configurations for your cluster into a file. The `kube_tool` requires Ruby 2.3 and above.
31
+
The included configuration tool `kube_tools` auto generates all the security parameters, the bootstrap token, and other configurations for your cluster into a file. The `kube_tool` requires Ruby 2.3 and above.
32
32
33
-
First install the module `puppet module install puppetlabs-kubernetes --version 0.1.0`. We would suggest doing this on a local machine and not a Puppet server as you need cfssl installed.
33
+
1. cfssl is a requirement, so we recommend you install the module on a local machine and not a Puppet server by running this command:
34
34
35
-
To install cfssl, see Cloudflare's [cfssl documentation](https://github.com/cloudflare/cfssl). Change directory into the root of the module and issue `bundle install`.
36
-
Then cd into the [tools](https://github.com/puppetlabs/puppetlabs-kubernetes/tree/master/tooling) directory. You will now be able to run the `kube_tool`.
2. Install cfssl. See Cloudflare's [cfssl documentation](https://github.com/cloudflare/cfssl).
40
+
41
+
3. Change directory into the root of the module, and run the `bundle install` command.
42
+
43
+
4. Change directory into the [tools](https://github.com/puppetlabs/puppetlabs-kubernetes/tree/master/tooling) directory, and run the `kube_tool` command.
44
+
45
+
5. To view the help menu, run the `./kube_tool.rb -h` command.
37
46
38
-
To look at the kube_tools help menu. Just issue `./kube_tool.rb -h` this will print out:
47
+
The kube_tools help menu:
39
48
40
49
```puppet
41
50
Usage: kube_tool [options]
@@ -52,10 +61,9 @@ Usage: kube_tool [options]
52
61
-h, --help Displays Help
53
62
```
54
63
55
-
So to generate the hiera file for my cluster I would use:
64
+
So to generate the hiera file for my cluster I use:
The tool creates a `kubernetes.yaml` file. To view the file contents on screen, run the `cat` command.
71
79
72
-
Add the `kubernetes.yaml` file to the Hiera directory on your Puppet server.
80
+
6.Add the `kubernetes.yaml` file to the Hiera directory on your Puppet server.
73
81
74
82
The tool also creates a bootstrap token and base64 encodes any values that need to be encoded for Kubernetes. If you run the `cat` command again, all the values are re-generated, including the certificates and tokens. You can then use Jenkins or Bamboo to add the Hiera file to your control repository or version control application.
75
83
76
84
If you don't want to use the `kube_tools` configuration tool and want to manually configure the module, all of the parameters are listed in the [Reference](#reference) section and in the [init.pp](https://github.com/puppetlabs/puppetlabs-kubernetes/blob/master/manifests/init.pp) file.
77
85
78
-
A Dockerfile has also been included in case you don't wish to install the dependencies in your local environment. To build this yourself, `cd`into the tooling directory and run `docker build -t puppet/kubetool .`
86
+
If you don't want to install the dependencies in your local environment, a Dockerfile is included. To build, change directory into the tooling directory, and run the `docker build -t puppet/kubetool` command.
79
87
80
88
The docker image takes each of the parameters as environment variables. When run as follows it will output a kubernetes.yaml file in your current working directory:
0 commit comments