본문으로 건너뛰기

Cluster API에서 k0smotron InfrastructureProvider 사용하기

InfrastructureProvider

---
apiVersion: v1
kind: Namespace
metadata:
name: capi-k0smotron-infrastructure

---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider
metadata:
name: k0sproject-k0smotron
namespace: capi-k0smotron-infrastructure
spec:
version: v1.6.2

RemoteCluster

apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: RemoteCluster
spec:

RemoteMachine

RemoteMachine은 SSH로 접근 가능한 VM 또는 bare-metal 서버입니다.

---
apiVersion: v1
kind: Secret
type: Opaque
data:
value: <cat <privateKeyPath> | base64 | tr -d '\n'>

---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: RemoteMachine
spec:
address: <ip|host>
port: <port>
user: <user>
sshKeyRef:
name: <secretName>

RemoteMachineTemplate과 PooledRemoteMachine

---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: RemoteMachineTemplate
spec:
template:
spec:
pool: <pool>

---
apiVersion: v1
kind: Secret
type: Opaque
data:
value: <cat <privateKeyPath> | base64 | tr -d '\n'>

---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PooledRemoteMachine
spec:
pool: <pool>
machine:
address: <ip|host>
port: <port>
user: <user>
sshKeyRef:
name: <secretName>
# ...