| Term | Meaning |
|---|---|
| Destroy | vCenter Destroy_Task API - deletes VM + files. Requires host communication. |
| UnregisterVM | vCenter API - removes VM from inventory. Files remain on datastore. |
| EvacuateVM | Our flow - offboard VM from TCP when host is unavailable, track cleanup for later. Covers both Unregistered and Abandoned outcomes. |
| Abandoned | Neither Destroy nor Unregister succeeded. VM + files remain on host. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'optparse' | |
| require 'yaml' | |
| require 'base64' | |
| options = { | |
| config_path: File.join(ENV['HOME'], '.kube', 'config'), | |
| write_dir: File.join(ENV['HOME'], '.kube') | |
| } | |
| OptionParser.new do |opts| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Input: ./extract_kubecfg_cert.sh my-cluster-name username | |
| # Output: ./my-cluster-name-ca.crt ./username.crt ./username.key | |
| # Exit on error | |
| abort(){ | |
| echo $1 && exit 1 | |
| } | |
| # Prerequistes |