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
{{ message }}
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ To use the cluster-api to deploy a Kubernetes cluster to Packet, you need the fo
11
11
* A Packet API key
12
12
* A Packet project ID
13
13
* The `clusterctl` binary from this repository.
14
-
* A Kubernetes cluster - the "bootstrap cluster" - that will deploy and manage the cluster on Packet.
14
+
* A Kubernetes cluster - the "bootstrap cluster" - that will deploy and manage the cluster on Packet.
15
15
*`kubectl` - not absolutely required, but hard to interact with a cluster without it
16
16
17
17
For the bootstrap cluster, any cluster is just fine for this, including [k3s](https://k3s.io), [k3d](https://github.com/rancher/k3d) and [kind](https://github.com/kubernetes-sigs/kind).
@@ -34,13 +34,15 @@ To deploy a cluster:
34
34
*`CLUSTER_NAME` - The created cluster will have this name. If not set, it will generate one for you.
35
35
*`FACILITY` - The Packet facility where you wantto deploy the cluster. If not set, it will default to `ewr1`.
36
36
*`SSH_KEY` - The path to an ssh public key to place on all of the machines. If not set, it will use whichever ssh keys are defined for your project.
37
+
*`CA_KEY` - The path to a file with the CA private key. If not set, it will generate one for you.
38
+
*`CA_CERT` - The path to a file with the CA certificate. If not set, it will generate one for you.
37
39
1. Create the config files you need via `./generate-yaml.sh`. This will generate the following files in [out/packet](./out/packet):
38
40
*`cluster.yaml`
39
41
*`machines.yaml`
40
-
*`provider-components.yaml` - note that this file _will_ contain your secrets, specifically `PACKET_API_KEY`, to be loaded into the cluster
42
+
*`provider-components.yaml` - note that this file _will_ contain your secrets, specifically `PACKET_API_KEY`, to be loaded into the cluster, and optionally your CA private key, if provided (but not if auto-generated)
41
43
*`addons.yaml` - note that this file _will_ contain your secrets, specifically `PACKET_API_KEY`, to be loaded into the cluster
42
44
1. If desired, edit the following files:
43
-
*`cluster.yaml` - to change parameters or settings, including network CIDRs, and, if desired, your own CA certificate and key
45
+
*`cluster.yaml` - to change parameters or settings, including network CIDRs
44
46
*`machines.yaml` - to change parameters or settings, including machine types and quantity
45
47
1. Run `clusterctl` with the appropriate command.
46
48
@@ -72,7 +74,6 @@ Run `clusterctl create cluster --help` for more options, for example to use an e
72
74
73
75
If you do not change the generated `yaml` files, it will use defaults. You can look in the `*.yaml.template` files in [cmd/clusterctl/examples/packet/](./cmd/clusterctl/examples/packet/) for details.
74
76
75
-
* CA key/certificate: leave blank, which will cause the `manager` to create one.
76
77
* service CIDR: `172.25.0.0/16`
77
78
* pod CIDR: `172.26.0.0/16`
78
79
* service domain: `cluster.local`
@@ -112,7 +113,7 @@ Note that, unlike `clusterctl`, this method will not take care of the following:
112
113
113
114
The components deployed via the `yaml` files are the following:
114
115
115
-
*`cluster.yaml` - contains
116
+
*`cluster.yaml` - contains
116
117
* a single `Cluster` CRD which defines the new cluster to be deployed. Includes cluster-wide definitions, including cidr definitions for services and pods.
117
118
*`machines.yaml` - contains
118
119
* one or more `Machine` CRDs, which cause the deployment of individual server instance to serve as Kubernetes master or worker nodes.
@@ -142,9 +143,9 @@ The Packet cluster-api provider follows the standard design for cluster-api. It
142
143
The actual machines are deployed using `kubeadm`. The deployment process uses the following process.
143
144
144
145
1. When a new `Cluster` is created:
145
-
* if the `ClusterSpec` does not include a CA key/certificate pair, create one and save it on the `Cluster` object
146
+
* if the appropriate `Secret` does not include a CA key/certificate pair, create one and save it in that `Secret`
146
147
2. When a new master `Machine` is created:
147
-
* retrieve the CA certificate and key from the `Cluster` object
148
+
* retrieve the CA certificate and key from the appropriate Kubernetes `Secret`
148
149
* launch a new server instance on Packet
149
150
* set the `cloud-init` on the instance to run `kubeadm init`, passing it the CA certificate and key
0 commit comments