curl --request POST \
--url https://app.trustivan.com/api/v1/kubernetes/clusters \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/kubernetes/clusters"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/kubernetes/clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/kubernetes/clusters"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Connect a Kubernetes cluster
The cluster’s IDENTITY is DISCOVERED, not supplied: TRUSTIVAN reads the
kube-system namespace UID from the API server. That is what makes a
rebuilt cluster correctly a different cluster rather than one that
silently inherits the old one’s findings, and it means a customer cannot
mistype an identifier into pointing at another cluster’s history.
api_server is the API server’s https URL; plain http and a URL
carrying credentials are refused. The token is stored through the
credential service, encrypted, and removed again if the connection
fails, so a corrected retry does not conflict. This surface holds a
reference and never a secret.
Admission control is OFF for a newly connected cluster. A customer
enables it deliberately through PUT /kubernetes/clusters/{id}/admission,
having read what the failure modes mean.
Behind credentials:manage.
curl --request POST \
--url https://app.trustivan.com/api/v1/kubernetes/clusters \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/kubernetes/clusters"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/kubernetes/clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/kubernetes/clusters"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
The connected cluster, with its discovered UID and version.