Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mtulio/oc-plugin-machine-resize

OpenShift plugin to Resize Machines
https://github.com/mtulio/oc-plugin-machine-resize

Last synced: 8 days ago
JSON representation

OpenShift plugin to Resize Machines

Awesome Lists containing this project

README

        

# OpenShift plugin to Resize Machines

`oc` plugin to resize a Machine on OpenShift cluster.

!!! tldr "Important Note"
- All steps described here will follow the safety way to resize a Machine in OCP 4.x.
- This is not a official documentation and this plugin was tested on version 4.9

## Install

Download the script:

``` shell
curl -s https://github.com/mtulio/oc-plugin-machine-resize/blob/master/oc-machine_resize \
-o /usr/local/bin/oc-machine_resize
```

Grant permissions to run:
``` shell
chmod u+x /usr/local/bin/oc-machine_resize
```

Test it:

``` shell
oc machine-resize -h
```

## Commands

### help

`--help`

### list machines

`--list-machines | -l`

### resize machine

`--machine-name --size [--force|--continue]`

**Extra args**:

- `--force` : force to skip healthy checks. Eg if node holds a etcd leader pod
- `--continue` : continue to stop from broken script. Eg when node was already cordoned/stopped, and not resize from cloud provider. It will skip the initial sanity checks (Eg: Ready node)

## Usage

- list current machines

``` shell
oc machine-resize -l
```

- resize a nachine

``` shell
oc machine-resize -N mrb-gptgl-master-1 -s m5.xlarge
```

- resize a nachine that holds the etcd leader pod

``` shell
oc machine-resize -N mrb-gptgl-master-0 -s m5.xlarge --force
```

### Cast: resizing master node that host the etcd leader pod

[![asciicast](https://asciinema.org/a/440747.svg)](https://asciinema.org/a/440747)

### Cast: resizing the node on Azure

[![asciicast](https://asciinema.org/a/443591.svg)](https://asciinema.org/a/443591)

## ToDo Next

- support new platforms: Azure
- increase the final healthy checks:
- check if COs are not degraded
- check apiserver, etcd pods
- check etcd cluster: health ndoes, leaders, etc
- firing alarms?