Self-Managed / On-Prem Kubernetes
Connect a self-managed or on-premises Kubernetes cluster to DuploCloud AI by creating a service account token and registering it as a Kubernetes provider.
Prerequisites
Step 1 — Create the service account and RBAC
apiVersion: v1
kind: ServiceAccount
metadata:
name: duplocloud-agent
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: duplocloud-agent-role
rules:
- apiGroups: [""]
resources:
- nodes
- pods
- services
- endpoints
- namespaces
- persistentvolumes
- persistentvolumeclaims
- events
- configmaps
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources:
- deployments
- daemonsets
- statefulsets
- replicasets
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes", "pods"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: duplocloud-agent-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: duplocloud-agent-role
subjects:
- kind: ServiceAccount
name: duplocloud-agent
namespace: kube-systemStep 2 — Mint a long-lived token
Step 3 — Extract the token, endpoint, and CA certificate
Step 4 — Add the Kubernetes provider
Step 5 — Add the token credential
Step 6 — Add a scope
Last updated
Was this helpful?

