Parent: #441
Depends on: Kubernetes node type and configuration
Summary
Implement the Kubernetes API client used by Manager and verify that Manager can authenticate with and inspect a configured Kubernetes cluster.
Use the native Kubernetes API through the official Node.js client. Manager should not invoke kubectl.
Scope
Implement KubernetesApi using:
@kubernetes/client-node
Support:
- Loading kubeconfig from
kubeconfigPath
- Selecting
kubeContext
- Using the configured
kubeNamespace
- Constructing Kubernetes API clients
- Validating API connectivity
- Listing Kubernetes cluster nodes
- Reading Kubernetes node readiness and addresses
- Handling authentication and connection errors
- Mocked unit tests
Cluster discovery
Implement nodes() or the equivalent provider method.
Return useful information such as:
- Kubernetes node name
- Ready status
- Internal IP
- External IP when available
Keep the result compatible with Manager's provider abstraction where practical.
Error handling
Handle at least:
- kubeconfig not found
- invalid kubeconfig
- requested context not found
- Kubernetes API unreachable
- unauthorized
- forbidden
- TLS errors
Errors must not include secrets from the kubeconfig.
Acceptance criteria
Out of scope
- Deployment creation
- Container lifecycle
- Reconfiguration
- Services
- Ingress
- Persistent storage
Parent: #441
Depends on: Kubernetes node type and configuration
Summary
Implement the Kubernetes API client used by Manager and verify that Manager can authenticate with and inspect a configured Kubernetes cluster.
Use the native Kubernetes API through the official Node.js client. Manager should not invoke
kubectl.Scope
Implement
KubernetesApiusing:@kubernetes/client-nodeSupport:
kubeconfigPathkubeContextkubeNamespaceCluster discovery
Implement
nodes()or the equivalent provider method.Return useful information such as:
Keep the result compatible with Manager's provider abstraction where practical.
Error handling
Handle at least:
Errors must not include secrets from the kubeconfig.
Acceptance criteria
@kubernetes/client-nodeis added as a dependency.kubectlsubprocess is used.Out of scope