An example implementation in NodeJS of a kubernetes client to interact with a Virtual Server resource on CoreWeave Cloud.
The client (
client.js) provides an interface to create a Kubernetes client using your Kubernetes credentials (token).
client.jsmay be dropped into any application and used to interface with the Virtual Server resource.
A set of functions specific to creating, modifying, and checking the status of a Virtual Server are additionally provided, which operate as follows:
The example application serves as an example of how to implement
client.js. Additionally, the example application illustrates how one might retrieve status information from a running Virtual Server, retrieving its run state and network information.
Finally, the example shows how to simply interface with the
kubevirt __ subresourceAPI in order to start and stop a Virtual Server.
username, #Set from environment variable
password #Set from environment variable