2019-06-30 12:02:25 +01:00
|
|
|
# kops
|
|
|
|
|
2023-07-16 18:23:40 +01:00
|
|
|
> Create, destroy, upgrade and maintain Kubernetes clusters.
|
2020-12-04 12:37:44 +00:00
|
|
|
> More information: <https://github.com/kubernetes/kops/>.
|
2019-06-30 12:02:25 +01:00
|
|
|
|
|
|
|
- Create a cluster from the configuration specification:
|
|
|
|
|
|
|
|
`kops create cluster -f {{cluster_name.yaml}}`
|
|
|
|
|
2024-03-14 05:01:06 +00:00
|
|
|
- Create a new SSH public key:
|
2019-06-30 12:02:25 +01:00
|
|
|
|
|
|
|
`kops create secret sshpublickey {{key_name}} -i {{~/.ssh/id_rsa.pub}}`
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Export the cluster configuration to the `~/.kube/config` file:
|
2019-06-30 12:02:25 +01:00
|
|
|
|
|
|
|
`kops export kubecfg {{cluster_name}}`
|
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Get the cluster configuration as YAML:
|
2019-06-30 12:02:25 +01:00
|
|
|
|
|
|
|
`kops get cluster {{cluster_name}} -o yaml`
|
|
|
|
|
|
|
|
- Delete a cluster:
|
|
|
|
|
|
|
|
`kops delete cluster {{cluster_name}} --yes`
|
2023-10-10 05:04:43 +01:00
|
|
|
|
|
|
|
- Validate a cluster:
|
|
|
|
|
|
|
|
`kops validate cluster {{cluster_name}} --wait {{wait_time_until_ready}} --count {{num_required_validations}}`
|