Home Cloud Computing VMware Delete an orphaned PKS cluster

VMware Delete an orphaned PKS cluster

VMware Delete an orphaned PKS cluster

You may run into a situation where your PKS cluster is orphaned or you’re unable to delete it with the pks delete-cluster command. I’m going to show how to manually clean up the PKS cluster in the database.

In the background I’ve reproduced this issue by deleting the BOSH deployment that backs the PKS cluster. When I attempt to delete it with:

pks delete-cluster cluster1

I receive the error: Error: {}. However, if I run pks clusters, the cluster is still listed. The Kubernetes cluster VMs no longer exist in vCenter so we just need to remove the PKS cluster from the MariaDB running on the PKS VM. Let’s start by sshing to the PKS VM. We will need two pieces of information to do this:

  1. The environment name:
  2. The PKS deployment ID: pivotal-container-service-c4ffe959d20cd65146d6

Once we have this we can ssh into the PKS VM by running the following command:

bosh -e -d pivotal-container-service-c4ffe959d20cd65146d6 ssh

Since there is only a single instance in the deployment, we don’t need to specify the instance name.

Once we are logged in, we can access the database by running:

sudo -i

/var/vcap/packages/mariadb/bin/mysql -u root -p

This will prompt us for a password, which we can get by logging into CF Ops Manager, selecting the PKS tile and selecting:

  1. Credentials tab
  2. Link to Credentials for the Cf Mysql Mysql Admin password

This will take us to a page where we can find the password (secret):

Paste this value into the password prompt and press enter.

Once we are logged into the the database server, we can select the PKS database by running:

use pks;

Show the available tables:

show tables;

delete from cluster where name = ‘cluster1’;

Now when you run pks clusters the cluster will be gone.

Read the entire article here, Delete an orphaned PKS cluster

Via the fine folks at VMware!

VMware VMware is the leader in virtualization and cloud infrastructure solutions that enable businesses to thrive in the Cloud Era. Customers rely on VMware to help them transform the way they build, deliver and consume Information Technology resources in a manner that is evolutionary and based on their specific needs. With 2013 revenues of $5.21 billion, VMware has more than 500,000 customers and 75,000 partners. The company is headquartered in Silicon Valley with offices throughout the world and can be found online at www.vmware.com.

Featured Resources:

Related Articles:


White Papers

    Application Lifecycle Management with Stratusphere UX – White Paper

    Enterprises today are faced with many challenges, and among those at the top of the list is the struggle surrounding the design, deployment, management and operations that support desktop applications. The demand for applications is increasing at an exponential rate, and organizations are being forced to consider platforms beyond physical, virtual and cloud-based environments. Users […]


      Download Commvault VM Backup and Recovery: end-to-end VM backup, recovery and cloud management

      Commvault’s ability to provide end-to-end VM backup, recovery and cloud management creates a significantly better way to build, protect and optimize VMs throughout their lifecycle. Our best-in-class software for VM backup, recovery and cloud management delivers a number of significant benefits, including: VM recovery with live recovery options; backup to and in the cloud; custom-fit […]

      On-Demand Webinars

        What’s Going on in EUC Printing – A Technical Deep Dive!

        The IGEL Community and ThinPrint invite you to watch the following technical deep dive webinar. The agenda is to technically bring you up to speed on what’s going on in the EUC Printing space today along with a deep dive into new methods, technologies, printing scenarios and a discussion on why printing still matters. You […]

        Latest Videos

          Views All IT News on DABCC.com
          Views All IT Videos on DABCC.com
          Win big $$, visit ITBaller.com for more info!

          Visit Our Sponsors