[CAPI install] envtest.kubeconfig is not deleted when destroying cluster

Solution Verified - Updated -

Issue

  • After destroying cluster, there are still some files leftover in <install-dir>/.clusterapi_output

    $ ls -ltra
    total 1516
    drwxr-xr-x. 1 fedora fedora     596 Jun 17 03:46 ..
    drwxr-x---. 1 fedora fedora      88 Jun 17 06:09 .clusterapi_output
    -rw-r--r--. 1 fedora fedora 1552382 Jun 17 06:09 .openshift_install.log
    drwxr-xr-x. 1 fedora fedora      80 Jun 17 06:09 . 
    
    $ ls -ltr .clusterapi_output/
    total 40
    -rw-r--r--. 1 fedora fedora  2335 Jun 17 05:58 envtest.kubeconfig
    -rw-r--r--. 1 fedora fedora 20542 Jun 17 06:03 kube-apiserver.log
    -rw-r--r--. 1 fedora fedora 10656 Jun 17 06:03 etcd.log
    
  • Then continue installing new cluster within same install dir, installer exited with error as below:

    $ ./openshift-install create cluster --dir ipi-aws
    INFO Credentials loaded from the "default" profile in file "/home/fedora/.aws/credentials" 
    INFO Consuming Install Config from target directory 
    FATAL failed to fetch Cluster: failed to load asset "Cluster": local infrastructure provisioning artifacts already exist. There may already be a running cluster 
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.16

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content