KubernetesService
extends VultrService
in package
Kubernetes service handler, for all kubernetes endpoints.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- createCluster() : VKECluster
- Create a kubernetes cluster.
- createNodePool() : NodePool
- Create a node pool in the kubernetes cluster.
- deleteCluster() : void
- Delete a kubernetes cluster.
- deleteClusterAndRelatedResources() : void
- Delete a kubernetes cluster and its resources.
- deleteNodePool() : void
- Delete a node pool from a kubernetes cluster.
- deleteNodePoolInstance() : void
- Delete an instance from a node pool.
- getAvailableClusterUpgrades() : array<string|int, mixed>
- Get available cluster upgrades.
- getAvailableVersions() : array<string|int, mixed>
- Get available kubernetes versions that vultr supports.
- getCluster() : VKECluster
- Retrieve a kubernetes cluster on the account.
- getClusterKubeconfig() : string
- Get the kubeconfig for the kubernetes cluster.
- getClusters() : array<string|int, VKECluster>
- Get a list of kubernetes clusters on the account.
- getNodePool() : NodePool
- Get a specific node pool in the kubernetes cluster.
- getNodePools() : array<string|int, NodePool>
- Get available node pools in the kubernetes cluster.
- getResources() : array<string|int, mixed>
- Get resources belonging to a kubernetes cluster.
- recycleNodePoolInstance() : void
- Reinstall a specific instance from a node pool.
- startClusterUpgrade() : void
- Start a kubernetes cluster version upgrade.
- updateCluster() : void
- Update a kubernetes cluster.
- updateNodePool() : NodePool
- Update a node pool in the kubernetes cluster with attributes from an initialized object.
- createObject() : ModelInterface
- deleteObject() : void
- getClientHandler() : VultrClientHandler
- getListObjects() : array<string|int, ModelInterface>
- getObject() : ModelInterface
- getVultrClient() : VultrClient
- list() : array<string|int, mixed>
- patchObject() : void
- getReadableClassType() : string
Properties
$vultr
protected
VultrClient
$vultr
$client
private
VultrClientHandler
$client
Methods
__construct()
public
__construct(VultrClient $vultr, VultrClientHandler $client) : mixed
Parameters
- $vultr : VultrClient
- $client : VultrClientHandler
createCluster()
Create a kubernetes cluster.
public
createCluster( $region, $version, $node_pools[, string|null $label = null ]) : VKECluster
Parameters
Tags
Return values
VKEClustercreateNodePool()
Create a node pool in the kubernetes cluster.
public
createNodePool( $id, $pool) : NodePool
Parameters
Tags
Return values
NodePooldeleteCluster()
Delete a kubernetes cluster.
public
deleteCluster( $id) : void
Parameters
Tags
deleteClusterAndRelatedResources()
Delete a kubernetes cluster and its resources.
public
deleteClusterAndRelatedResources( $id) : void
This means it will delete blockstorage, load balancers, and any other related resources.
Parameters
Tags
deleteNodePool()
Delete a node pool from a kubernetes cluster.
public
deleteNodePool( $id, $nodepool_id) : void
Parameters
Tags
deleteNodePoolInstance()
Delete an instance from a node pool.
public
deleteNodePoolInstance( $id, $nodepool_id, $node_id) : void
Parameters
- $id :
-
- string - VKE UUID, Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $nodepool_id :
-
- string
- $node_id :
-
- string
Tags
getAvailableClusterUpgrades()
Get available cluster upgrades.
public
getAvailableClusterUpgrades( $id) : array<string|int, mixed>
Parameters
Tags
Return values
array<string|int, mixed>getAvailableVersions()
Get available kubernetes versions that vultr supports.
public
getAvailableVersions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getCluster()
Retrieve a kubernetes cluster on the account.
public
getCluster( $id) : VKECluster
Parameters
Tags
Return values
VKEClustergetClusterKubeconfig()
Get the kubeconfig for the kubernetes cluster.
public
getClusterKubeconfig( $id) : string
Parameters
Tags
Return values
stringgetClusters()
Get a list of kubernetes clusters on the account.
public
getClusters([ &$options = null ]) : array<string|int, VKECluster>
Parameters
Tags
Return values
array<string|int, VKECluster>getNodePool()
Get a specific node pool in the kubernetes cluster.
public
getNodePool( $id, $nodepool_id) : NodePool
Parameters
- $id :
-
- string - VKE UUID, Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $nodepool_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
Tags
Return values
NodePoolgetNodePools()
Get available node pools in the kubernetes cluster.
public
getNodePools( $id[, ListOptions|null &$options = null ]) : array<string|int, NodePool>
Parameters
- $id :
-
- string - VKE UUID, Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $options : ListOptions|null = null
Tags
Return values
array<string|int, NodePool>getResources()
Get resources belonging to a kubernetes cluster.
public
getResources( $id) : array<string|int, mixed>
Parameters
Tags
Return values
array<string|int, mixed>recycleNodePoolInstance()
Reinstall a specific instance from a node pool.
public
recycleNodePoolInstance( $id, $nodepool_id, $node_id) : void
Parameters
- $id :
-
- string - VKE UUID, Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $nodepool_id :
-
- string
- $node_id :
-
- string
Tags
startClusterUpgrade()
Start a kubernetes cluster version upgrade.
public
startClusterUpgrade( $id, $upgrade_version) : void
Parameters
- $id :
-
- string - VKE UUID, Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $upgrade_version :
-
- string - Example: v1.22.8+3
Tags
updateCluster()
Update a kubernetes cluster.
public
updateCluster( $id, $label) : void
Parameters
Tags
updateNodePool()
Update a node pool in the kubernetes cluster with attributes from an initialized object.
public
updateNodePool( $id, $nodepool) : NodePool
Parameters
Tags
Return values
NodePoolcreateObject()
protected
createObject( $uri, $model, $params) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are creating
- $params :
-
- array - The values that we will be sending. Refactor to use getUpdateParams/getUpdateArray?
Tags
Return values
ModelInterfacedeleteObject()
protected
deleteObject( $uri, $model) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are acting on deleting. This doesn't need to be a fully initialized object.
Tags
getClientHandler()
protected
getClientHandler() : VultrClientHandler
Return values
VultrClientHandlergetListObjects()
protected
getListObjects( $uri, $model[, &$options = null ][, $params = null ]) : array<string|int, ModelInterface>
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
- $options : = null
-
- ListOptions - Pagination object
- $params : = null
-
- array - filter parameters.
Tags
Return values
array<string|int, ModelInterface>getObject()
protected
getObject( $uri, $model) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
Tags
Return values
ModelInterfacegetVultrClient()
protected
getVultrClient() : VultrClient
Return values
VultrClientlist()
protected
list(string $uri, ModelInterface $model, ListOptions &$options[, array<string|int, mixed>|null $params = null ]) : array<string|int, mixed>
Parameters
- $uri : string
- $model : ModelInterface
- $options : ListOptions
- $params : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>patchObject()
protected
patchObject( $uri, $model[, array<string|int, mixed>|null $params = null ]) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are updating. This needs to be a fully initialized object.
- $params : array<string|int, mixed>|null = null
Tags
getReadableClassType()
private
getReadableClassType(ModelInterface $model) : string
Parameters
- $model : ModelInterface