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