Cluster Management v1

The core cluster API. Every endpoint is scoped to a single cluster identified by {owner} (the organization slug or username that owns the cluster) and {cluster} (the cluster name), and is served under:

/api/v1/clusters/{owner}/{cluster}/...

All routes require a personal access token sent as Authorization: token <YOUR_TOKEN> (it may also be supplied as a token or access_token query parameter). Cluster routes additionally resolve the cluster’s stored credentials and build a Kubernetes client for it (“cluster assignment”); a few routes layer on extra authorization checks, which are called out per endpoint.

This group covers three related surfaces:

/api/v1/clusters/:owner/:cluster

The core cluster API: lifecycle, a generic Kubernetes resource proxy, and Helm release management. All routes require Token; cluster routes resolve credentials and build a Kubernetes client (“Cluster assignment”).

Lifecycle & info

MethodPathDescription
GET/Get cluster details
PUT/Update cluster (import options)
DELETE/Delete cluster (returns deletion command)
POST/removeRemove cluster registration
GET/client-configGet client kubeconfig
GET/available-typesDiscover available resource types
GET/db-status, /db-bundleDatabase status / bundle
POST/update-presets/:presetUpdate presets in a spoke cluster
GET/is-serverCheck if this is the hub cluster
GET/feature/factory-valuesDefault feature values
POST/execute-commandExecute a command against the cluster
POST/resourcesCreate an arbitrary resource
POST/DELETE/deploy/:idInstall / uninstall a product order
GET/resource-historyResource history (from NATS)

Kubernetes API proxy (/proxy)

Generic passthrough for any group/version/resource, powering the KubeDB Platform console’s resource pages:

MethodPath patternDescription
POST/GET/DELETE/proxy/:group/:version/:resource/Create / list / delete-collection (cluster-scoped)
GET/PUT/PATCH/DELETE/proxy/:group/:version/:resource/:nameCRUD on a resource
PUT/PATCH/proxy/:group/:version/:resource/:name/statusUpdate resource status
GET/proxy/:group/:version/:resource/:name/events, /controllerEvents / owning controller
POST/GET/DELETE/proxy/:group/:version/namespaces/:namespace/:resource/Namespaced create / list / delete-collection
GET/PUT/PATCH/DELETE/proxy/:group/:version/namespaces/:namespace/:resource/:nameNamespaced CRUD (+ /status, /events, /controller)
GET/PUT/proxy/.../:name/scaleGet / update scale subresource
GET/proxy/.../:name/horizontalpodautoscalersHPAs for a resource
GET/proxy/core/v1/namespaces/:namespace/:resource/:name/logStream pod logs
GET/proxy/core/v1/namespaces/:namespace/:resource/:name/execExec into a pod (websocket)
GET/proxy/core/v1/nodes/:name/metrics, .../pods/:name/metricsNode / pod metrics
POST/proxy/authorization.k8s.io/v1/selfsubjectaccessreviews“Can I” checks
GET/proxy/:group/:version/all-availableAll available objects for a group/version
GET/proxy/meta.k8s.appscode.com/v1alpha1/{renders,renderdashboards,rendermenus,resourcegraphs}UI render endpoints (cached)
GET/proxy/meta.k8s.appscode.com/v1alpha1/:resource/:menu/availableAvailable user menus
GET/proxy/reports.scanner.appscode.com/v1alpha1/{images,cvereports}Image scan / CVE reports
GET/proxy/policy.k8s.appscode.com/v1alpha1/policyreportsPolicy reports
POST/proxy/batch-deleteBatch-delete multiple resources

Helm (/helm)

MethodPathDescription
GET/PUT/helm/tiller-config, GET /helm/tiller-config/defaultHelm console configuration
GET/POST/helm/v3/releases/List / install Helm v3 releases
GET/PUT/DELETE/helm/v3/releases/:name/History / upgrade / uninstall a release
GET/helm/v3/releases/:name/content, /statusRelease manifest / status
POST/helm/v3/releases/:name/rollbackRollback a release
GET/helm/bundleview, POST /helm/bundleview/ordersBundle view / order for a chart bundle
GET/helm/packageview (+/files, /files/*, /values)Package view, files, values of a chart
POST/helm/packageview/ordersCreate an order for an editor chart
PUT/helm/options/{model,manifest,resources}Generate editor model / preview manifest & resources
PUT/DELETE/helm/editor/Apply (install/update) / delete resources via the editor
PUT/helm/editor/{model,manifest,resources}Load editor state from an existing install

Pages

  • Cluster Lifecycle & Info — get, update, and delete a cluster; fetch its kubeconfig; discover available resource types; database status/bundle; feature values; execute whitelisted commands; create resources; install/uninstall deploy orders; and read resource history.
  • Kubernetes Proxy — the generic /proxy/* passthrough for any Kubernetes group/version/resource (CRUD, status, events, controller, scale, HPAs), plus pod logs/exec, node/pod metrics, access reviews, the meta.k8s.appscode.com render endpoints, scanner/policy reports, and batch delete.
  • Helm — Helm console (tiller) configuration, Helm v3 release management (list/install/upgrade/uninstall/rollback, content, status, history), bundle/package views, and the resource editor.