https://github.com/h3poteto/k8s-clusters
kops kubernetes cluster definition
https://github.com/h3poteto/k8s-clusters
kops kubernetes
Last synced: 3 months ago
JSON representation
kops kubernetes cluster definition
- Host: GitHub
- URL: https://github.com/h3poteto/k8s-clusters
- Owner: h3poteto
- Created: 2019-02-20T13:01:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2026-03-23T14:09:29.000Z (3 months ago)
- Last Synced: 2026-03-24T11:52:15.719Z (3 months ago)
- Topics: kops, kubernetes
- Homepage:
- Size: 128 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Create cluster
```
$ kops create cluster $CLUSTER_NAME --zones ap-northeast-1a,ap-northeast-1c,ap-northeast-1d --node-count 3 --master-zones ap-northeast-1a,ap-northeast-1c,ap-northeast-1d --node-size t3.medium --master-size t3.small
```
Edit this cluster before apply. And apply it.
```
$ kops update cluster --name $CLUSTER_NAME --create-kube-config --admin --yes
```
## Edit cluster
You can edit cluster or instancegroup.
Edit cluster.
```bash
$ kops edit cluster $CLUSTER_NAME
```
Edit master instancegroup. You have to edit each master instance.
```bash
$ kops edit instancegroup master-ap-northeast-1a --name external-prd-20200329.k8s.h3poteto.dev
$ kops edit instancegroup master-ap-northeast-1c --name external-prd-20200329.k8s.h3poteto.dev
...
```
Edit node instancegroup.
```bash
$ kops edit instancegroup nodes --name external-prd-20200329.k8s.h3poteto.dev
```
## Update cluster
And after that, please update the cluster.
At first, update cluster definition.
Then rolling update the cluster to replace all master and node instances.
```bash
$ kops update cluster --yes --admin --create-kube-config
```
Sometimes the command show some differences about iam role, please ignore it. I added required policy to role, but kops added the poliyc as inline policy, so the differences are appear. But it is no problem.
```bash
# update master instances
$ kops rolling-update cluster external-prd-20200329.k8s.h3poteto.dev --instance-group-roles=control-plane --force --yes
# update node instances
$ kops rolling-update cluster external-prd-20200329.k8s.h3poteto.dev --instance-group-roles=node --force --yes
```