In this today's session, we are going to deploy kubernetes (1master, 1worker) with libvirt.
- Hypervisor CPU: 8CPU+ (master1:4, worker1: 4)
- Hypervisor memory: 16G
| ## note: | |
| ## change e2e-bgp (not use frr container) | |
| [tohayash@tohayash-lab2 metallb]$ git diff | |
| diff --git a/e2etest/bgp_test.go b/e2etest/bgp_test.go | |
| index 2ba2032f..a7be9c16 100644 | |
| --- a/e2etest/bgp_test.go | |
| +++ b/e2etest/bgp_test.go | |
| @@ -73,7 +73,7 @@ var _ = ginkgo.Describe("BGP", func() { | |
| hostport := fmt.Sprintf("http://%s:%d/", | |
| ingressIP, |
| ---- | |
| apiVersion: networking.k8s.io/v1 | |
| kind: NetworkPolicy | |
| metadata: | |
| name: test-network-policy1 | |
| namespace: default | |
| spec: | |
| podSelector: | |
| matchLabels: | |
| role: db |
| --- | |
| apiVersion: apiextensions.k8s.io/v1 | |
| kind: CustomResourceDefinition | |
| metadata: | |
| name: network-attachment-definitions.k8s.cni.cncf.io | |
| spec: | |
| group: k8s.cni.cncf.io | |
| scope: Namespaced | |
| names: | |
| plural: network-attachment-definitions |
| ## Pull kube-ansible | |
| [tohayash@tohayash-lab work]$ git clone https://github.com/redhat-nfvpe/kube-ansible.git | |
| Cloning into 'kube-ansible'... | |
| remote: Enumerating objects: 32, done. | |
| remote: Counting objects: 100% (32/32), done. | |
| remote: Compressing objects: 100% (23/23), done. | |
| remote: Total 3019 (delta 8), reused 21 (delta 7), pack-reused 2987 | |
| Receiving objects: 100% (3019/3019), 529.58 KiB | 658.00 KiB/s, done. | |
| Resolving deltas: 100% (1382/1382), done. | |
| [tohayash@tohayash-lab work]$ cd kube-ansible |
| ## Create 3-node environment config | |
| [tohayash@tohayash-lab tmp]$ cat << EOF > config-3node.yml | |
| kind: Cluster | |
| apiVersion: kind.sigs.k8s.io/v1alpha3 | |
| nodes: | |
| - role: control-plane | |
| - role: worker | |
| - role: worker | |
| # Note: uncomment if you install cni plugin by yourself | |
| #networking: |
| --- | |
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: cni-install-sh | |
| namespace: kube-system | |
| data: | |
| install_cni.sh: | | |
| cd /tmp | |
| wget https://github.com/containernetworking/plugins/releases/download/v0.8.5/cni-plugins-linux-amd64-v0.8.5.tgz |
| [centos@kube-master ~]$ cat svc-nginx-k8s.yml | |
| --- | |
| kind: Service | |
| apiVersion: v1 | |
| metadata: | |
| name: k8s-nginx | |
| labels: | |
| endpointslice-controller.k8s.io: multus | |
| spec: | |
| selector: |
| --- | |
| apiVersion: "k8s.cni.cncf.io/v1" | |
| kind: NetworkAttachmentDefinition | |
| metadata: | |
| name: centos-gateway-def | |
| spec: | |
| config: '{ | |
| "cniVersion": "0.3.1", | |
| "plugins": [ | |
| { |
| --- | |
| apiVersion: "k8s.cni.cncf.io/v1" | |
| kind: NetworkAttachmentDefinition | |
| metadata: | |
| name: centos-runtimeconfig-def | |
| spec: | |
| config: '{ | |
| "cniVersion": "0.3.1", | |
| "plugins": [ | |
| { |