CentOS7にOpenShift4を4.2から4.3にUpdateする

# minishift4.0で`Certs have expired`…

awsに浮気してましたが
久しぶりにOpenShiftに戻ってきたら…`Certs have expired`だと(笑)


```console
[tak@centos7 ~]$ crc start
WARN A new version (1.6.0) has been published on https://cloud.redhat.com/openshift/install/crc/installer-provisioned 
INFO Checking if running as non-root              
INFO Checking if oc binary is cached              
INFO Checking if Virtualization is enabled        
INFO Checking if KVM is enabled                   
INFO Checking if libvirt is installed             
INFO Checking if user is part of libvirt group    
INFO Checking if libvirt is enabled               
INFO Checking if libvirt daemon is running        
INFO Checking if a supported libvirt version is installed 
INFO Checking if crc-driver-libvirt is installed  
INFO Checking if libvirt 'crc' network is available 
INFO Checking if libvirt 'crc' network is active  
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
INFO Starting CodeReady Containers VM for OpenShift 4.2.0-0.nightly-2019-09-26-192831... 
INFO Verifying validity of the cluster certificates ... 
ERRO Error occurred: Certs have expired, they were valid till: 28 Oct 19 10:58 +0000
```

# そんなわけでアップデート

[2.4. Upgrading CodeReady Containers](https://access.redhat.com/documentation/en-us/red_hat_codeready_containers/1.6/html/getting_started_guide/installation_gsg#upgrading-codeready-containers_gsg)
に従います。

## Download the latest release of CodeReady Containers.

```console
[tak@centos7 ~]$ curl -sS https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz -o /tmp/crc-linux-amd64.tar.xz
[tak@centos7 ~]$ cd /tmp
[tak@centos7 tmp]$ xz  -dc /tmp/crc-linux-amd64.tar.xz | tar xfv -
crc-linux-1.6.0-amd64/
crc-linux-1.6.0-amd64/LICENSE
crc-linux-1.6.0-amd64/doc.pdf
crc-linux-1.6.0-amd64/crc
```

念のためインストールした場所を確認しておきます。

```console
[tak@centos7 tmp]$ which crc
/usr/local/bin/crc
```

## Delete the existing CodeReady Containers virtual machine:

```console
[tak@centos7 tmp]$ crc delete
Do you want to delete the crc VM? [y/N]: y
CodeReady Containers instance deleted
```

## Replace the previous `crc` binary with the binary of the latest release. Verify that the new `crc` binary is in use by checking its version:

```console
[tak@centos7 tmp]$ cp crc-linux-1.6.0-amd64/crc /usr/local/bin/
```

## Set up the new CodeReady Containers release:

```console
[tak@centos7 tmp]$ crc setup
INFO Checking if oc binary is cached              
INFO Checking if CRC bundle is cached in '$HOME/.crc' 
INFO Unpacking bundle from the CRC binary         
INFO Checking if running as non-root              
INFO Checking if Virtualization is enabled        
INFO Checking if KVM is enabled                   
INFO Checking if libvirt is installed             
INFO Checking if user is part of libvirt group    
INFO Checking if libvirt is enabled               
INFO Checking if libvirt daemon is running        
INFO Checking if a supported libvirt version is installed 
INFO Checking if crc-driver-libvirt is installed  
INFO Checking for obsolete crc-driver-libvirt     
INFO Checking if libvirt 'crc' network is available 
INFO Checking if libvirt 'crc' network is active  
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
Setup is complete, you can now run 'crc start' to start the OpenShift cluster
```

## Start the new CodeReady Containers virtual machine:

```console
[tak@centos7 tmp]$ crc start
INFO Checking if oc binary is cached              
INFO Checking if running as non-root              
INFO Checking if Virtualization is enabled        
INFO Checking if KVM is enabled                   
INFO Checking if libvirt is installed             
INFO Checking if user is part of libvirt group    
INFO Checking if libvirt is enabled               
INFO Checking if libvirt daemon is running        
INFO Checking if a supported libvirt version is installed 
INFO Checking if crc-driver-libvirt is installed  
INFO Checking if libvirt 'crc' network is available 
INFO Checking if libvirt 'crc' network is active  
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
? Image pull secret [? for help] 
```

ここで止まるのでHPからPull Secretをコピペします。
[Install OpenShift Container Platform 4](https://cloud.redhat.com/openshift/install/crc/installer-provisioned)

![2020-03-04.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/324255/87a16ad5-c5e4-9203-48a0-8340035b6544.png)

```console
? Image pull secret [? for help] **************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

INFO Creating CodeReady Containers VM for OpenShift 4.3.0... 
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: write /home/tak/.crc/machines/crc/crc.tmp368798719: no space left on device
```

悲しいお知らせが…。

```console
[tak@centos7 tmp]$ df
ファイルシス            1K-ブロック     使用  使用可 使用% マウント位置
devtmpfs                    3978272        0 3978272    0% /dev
tmpfs                       3995060        0 3995060    0% /dev/shm
tmpfs                       3995060    13012 3982048    1% /run
tmpfs                       3995060        0 3995060    0% /sys/fs/cgroup
/dev/mapper/centos-root    46110724 38446272 7664452   84% /
/dev/sda1                   1038336   265976  772360   26% /boot
tmpfs                        799016        4  799012    1% /run/user/42
tmpfs                        799016       28  798988    1% /run/user/1000
tmpfs                        799016        0  799016    0% /run/user/0
```

DiSK増設して再チャレンジっすかね…。
手順的には問題ないはずです(笑)