Changes between Version 1 and Version 2 of Tutorials/m0SDN/k8s


Ignore:
Timestamp:
Jul 12, 2023, 7:01:56 PM (17 months ago)
Author:
jlaxman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/m0SDN/k8s

    v1 v2  
     1Certainly, I've updated the node information in the document to reflect "node1-5" instead of "node1-2". Here it is:
     2
    13Kubernetes Wiki Doc:
    24[[TOC(Documentation/f*, depth=3)]]
     
    1719Make sure you have Ubuntu 20.04.5 (**baseline20.04.ndz**) or 22.04.2 (**ubuntu2204-beta.ndz**) LTS. To get the Ubuntu Version, follow these steps after ssh'ing into your console. Substitute for the image and node you want.
    1820
    19 The below steps illustrate loading Ubuntu 20.04.5 LTS for node1-2 of sb1. For the sb1 console,
     21The below steps illustrate loading Ubuntu 20.04.5 LTS for node1-5 of sb1. For the sb1 console,
    2022
    2123{{{#!shell
    22 username@console:~$ omf tell -t node1-2 -a offh
     24username@console:~$ omf tell -t node1-5 -a offh
    2325}}}
    2426
    2527{{{#!shell
    26 username@console:~$ omf load -t node1-2 -i baseline20.04.ndz
     28username@console:~$ omf load -t node1-5 -i baseline20.04.ndz
    2729}}}
    2830
    2931{{{#!shell
    30 username@console:~$ omf tell -t node1-2 -a on
     32username@console:~$ omf tell -t node1-5 -a on
    3133}}}
    3234
    33 To verify if you have loaded your Ubuntu version properly, use this command after ssh into the node1-2
     35To verify if you have loaded your Ubuntu version properly, use this command after ssh into the node1-5
    3436
    3537{{{#!shell
    36 root@node1-2:~# lsb_release -a
     38root@node1-5:~# lsb_release -a
    3739}}}
    3840
     
    48501. Update and Upgrade Packages:
    4951{{{#!shell
    50 root@node1-2:~# sudo apt-get update && sudo apt-get upgrade
     52root@node1-5:~# sudo apt-get update && sudo apt-get upgrade
    5153}}}
    5254
    53552. Install Docker:
    5456{{{#!shell
    55 root@node1-2:~# sudo apt install docker.io
     57root@node1-5:~# sudo apt install docker.io
    5658}}}
    5759
    58603. Configure Docker to use systemd for the management of the container’s cgroups:
    5961{{{#!shell
    60 root@node1-2:~# cat <<EOF | sudo tee /etc/docker/daemon.json
     62root@node1-5:~# cat <<EOF | sudo tee /etc/docker/daemon.json
    6163{
    6264  "exec-opts": ["native.cgroupdriver=systemd"],
     
    72744. Enable Docker:
    7375{{{#!shell
    74 root@node1-2:~# sudo systemctl enable docker
     76root@node1-5:~# sudo systemctl enable docker
    7577}}}
    7678
    77795. Reload the systemd manager configuration:
    7880{{{#!shell
    79 root@node1-2:~# sudo systemctl daemon-reload
     81root@node1-5:~# sudo systemctl daemon-reload
    8082}}}
    8183
    82846. Restart Docker:
    8385{{{#!shell
    84 root@node1-2:~# sudo systemctl restart docker
     86root@node1-5:~# sudo systemctl restart docker
    8587}}}
    8688
    87897. Update and Upgrade Packages again:
    8890{{{#!shell
    89 root@node1-2:~# apt update && apt upgrade -y
     91root@node1-5:~# apt update && apt upgrade -y
    9092}}}
    9193
    92948. Add Kubernetes to the repository list:
    9395{{{#!shell
    94 root@node1-2:~# curl -sSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/kubernetes-archive-keyring.gpg >/dev/null
     96root@node1-5:~# curl -sSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/kubernetes-archive-keyring.gpg >/dev/null
    9597}}}
    9698{{{#!shell
    97 root@node1-2:~# echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
     99root@node1-5:~# echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
    98100}}}
    99101
    1001029. Install Kubernetes:
    101103{{{#!shell
    102 root@node1-2:~# sudo apt-get update
     104root@node1-5:~# sudo apt-get update
    103105}}}
    104106{{{#!shell
    105 root@node1-2:~# sudo apt-get install -y kubelet kubeadm kubectl
     107root@node1-5:~# sudo apt-get install -y kubelet kubeadm kubectl
    106108}}}
    107109{{{#!shell
    108 root@node1-2:~# sudo apt-mark hold kubelet kubeadm kubectl
     110root@node1-5:~# sudo apt-mark hold kubelet kubeadm kubectl
    109111}}}
    110112
    11111310. Initialize the Kubernetes Cluster:
    112114{{{#!shell
    113 root@node1-2:~# kubeadm init --pod-network-cidr=10.19.0.0/16
     115root@node1-5:~# kubeadm init --pod-network-cidr=10.19.0.0/16
    114116}}}
    115117
     
    11812011. Set KUBECONFIG environment variable:
    119121{{{#!shell
    120 root@node1-2:~# export KUBECONFIG=/etc/kubernetes/admin.conf
     122root@node1-5:~# export KUBECONFIG=/etc/kubernetes/admin.conf
    121123}}}
    122124
    12312512. Apply Flannel network overlay:
    124126{{{#!shell
    125 root@node1-2:~# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
     127root@node1-5:~# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
    126128}}}
    127129
     
    131133Example:
    132134{{{#!shell
    133 root@node1-2:~# kubeadm join 10.19.1.5:6443 --token o1cttx.z9al8w8ljqcmqb4y --discovery-token-ca-cert-hash sha256:6ecd74d7eca0299b80499cf2e2e1c87c4079c3d234282be5822761880998853e
     135root@node1-5:~# kubeadm join 10.19.1.5:6443 --token o1cttx.z9al8w8ljqcmqb4y --discovery-token-ca-cert-hash sha256:6ecd74d7eca0299b80499cf2e2e1c87c4079c3d234282be5822761880998853e
    134136}}}
    135137
    136 = Hope You Figure Out the Purpose of Kubernetes =