129 lines
3.7 KiB
YAML
129 lines
3.7 KiB
YAML
apiVersion: v1
|
|
data:
|
|
password: cjAwdG1l
|
|
username: cm9vdA==
|
|
kind: Secret
|
|
metadata:
|
|
labels:
|
|
airshipit.org/k8s-role: controlplane-host
|
|
name: node01-bmc-secret
|
|
type: Opaque
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
labels:
|
|
airshipit.org/k8s-role: controlplane-host
|
|
name: node01-network-data
|
|
stringData:
|
|
networkData: "links:\n-\n id: oam\n mtu: \"1500\"\n name: enp0s3\n type: phy\n
|
|
\ \n ethernet_mac_address: 52:54:00:9b:27:4c\n-\n id: pxe\n mtu: \"1500\"\n
|
|
\ name: enp0s4\n type: phy\n \n ethernet_mac_address: 52:54:00:b6:ed:31\nnetworks:\n-\n
|
|
\ id: oam-ipv4\n link: oam\n netmask: 255.255.255.0\n routes:\n - gateway:
|
|
10.23.25.1\n netmask: 0.0.0.0\n network: 0.0.0.0\n type: ipv4\n \n ip_address:
|
|
10.23.25.102\n-\n id: pxe-ipv4\n link: pxe\n netmask: 255.255.255.0\n type:
|
|
ipv4\n \n ip_address: 10.23.24.102\nservices:\n - address: 8.8.8.8\n type:
|
|
dns\n - address: 8.8.4.4\n type: dns\n \n"
|
|
type: Opaque
|
|
---
|
|
apiVersion: cluster.x-k8s.io/v1alpha3
|
|
kind: Cluster
|
|
metadata:
|
|
name: target-cluster
|
|
spec:
|
|
clusterNetwork:
|
|
pods:
|
|
cidrBlocks:
|
|
- 192.168.0.0/18
|
|
serviceDomain: cluster.local
|
|
services:
|
|
cidrBlocks:
|
|
- 10.96.0.0/12
|
|
controlPlaneRef:
|
|
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
|
|
kind: KubeadmControlPlane
|
|
name: cluster-controlplane
|
|
infrastructureRef:
|
|
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
|
|
kind: Metal3Cluster
|
|
name: target-cluster
|
|
---
|
|
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
|
|
kind: KubeadmControlPlane
|
|
metadata:
|
|
name: cluster-controlplane
|
|
spec:
|
|
infrastructureTemplate:
|
|
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
|
|
kind: Metal3MachineTemplate
|
|
name: cluster-controlplane
|
|
kubeadmConfigSpec:
|
|
files:
|
|
- content: |
|
|
kubernetes:
|
|
version: 1.17.3
|
|
container_runtime:
|
|
type: docker
|
|
owner: root:root
|
|
path: /konfigadm.yml
|
|
permissions: "0640"
|
|
initConfiguration:
|
|
nodeRegistration:
|
|
kubeletExtraArgs:
|
|
node-labels: metal3.io/uuid={{ ds.meta_data.uuid }}
|
|
name: '{{ ds.meta_data.local_hostname }}'
|
|
joinConfiguration:
|
|
controlPlane: {}
|
|
nodeRegistration:
|
|
kubeletExtraArgs:
|
|
node-labels: metal3.io/uuid={{ ds.meta_data.uuid }}
|
|
name: '{{ ds.meta_data.local_hostname }}'
|
|
postKubeadmCommands:
|
|
- kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f https://docs.projectcalico.org/v3.9/manifests/calico.yaml
|
|
preKubeadmCommands:
|
|
- wget -O "/usr/bin/konfigadm" https://github.com/flanksource/konfigadm/releases/download/v0.5.3/konfigadm
|
|
&& chmod +x "/usr/bin/konfigadm"
|
|
- konfigadm apply --config=/konfigadm.yml
|
|
replicas: 1
|
|
version: v1.17.0
|
|
---
|
|
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
|
|
kind: Metal3Cluster
|
|
metadata:
|
|
name: target-cluster
|
|
spec:
|
|
controlPlaneEndpoint:
|
|
host: 10.23.25.102
|
|
port: 6443
|
|
noCloudProvider: true
|
|
---
|
|
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
|
|
kind: Metal3MachineTemplate
|
|
metadata:
|
|
name: cluster-controlplane
|
|
spec:
|
|
template:
|
|
spec:
|
|
hostSelector:
|
|
matchLabels:
|
|
airshipit.org/k8s-role: controlplane-host
|
|
image:
|
|
checksum: http://10.23.24.1:8099/target-image.qcow2.md5sum
|
|
url: http://10.23.24.1:8099/target-image.qcow2
|
|
---
|
|
apiVersion: metal3.io/v1alpha1
|
|
kind: BareMetalHost
|
|
metadata:
|
|
labels:
|
|
airshipit.org/k8s-role: controlplane-host
|
|
name: node01
|
|
spec:
|
|
bmc:
|
|
address: redfish+http://10.23.25.1:8000/redfish/v1/Systems/air-target-1
|
|
credentialsName: node01-bmc-secret
|
|
bootMACAddress: 52:54:00:b6:ed:31
|
|
networkData:
|
|
name: node01-network-data
|
|
namespace: default
|
|
online: false
|