-
Notifications
You must be signed in to change notification settings - Fork 0
/
rasp3.1
113 lines (102 loc) · 3.86 KB
/
rasp3.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#to enable dhcp
11 vi /etc/dhcpcd.conf
#line..47,48
12 sudo reboot
#to get the latest Buster
15 sudo apt-get update
48 sudo apt-get full-upgrade
50 sudo apt-get dist-update
51 sudo apt-get dist-upgrade
#to change keyboard gb to us
52 sudo vi /etc/default/keyboard
53 reboot
#to install iptables
57 sudo apt install iptables-persistent -y
58 journactl -xe -u docker
59 sudo apt purge docker docker-ce docker-engine docker.io containerd runc
60 sudo systemctl list-jobs
61 /var/lib/containerd/
63 ls /var/lib/containerd/
64 sudo ls /var/lib/containerd/
65 sudo apt install iptables-persistent -y
66 sudo iptables -F
69 sudo apt-get update
71 apt list --upgradable
72 sudo apt list --upgradable
73 lsblk
78 sudo apt-get dist-upgrade
81 sudo apt-get dist-upgrade --allow-releaseinfo-change update
82 sudo apt-get full-upgrade --allow-releaseinfo-change update
83 sudo apt-get --allow-releaseinfo-change update full-upgrade
84 sudo apt-get --allow-releaseinfo-change update
85 sudo apt dist-upgrade -y
86 sudo apt update
87 sudo rpi-update
88 sudo vi /etc/apt/sources.list
89 sudo apt dist-upgrade -y
90 vi /etc/apt/sources.list.d/raspi.list
91 sudo vi /etc/apt/sources.list.d/raspi.list
92 sudo apt update
93 sudo apt update --allow-releaseinfo-change
94 sudo vi /etc/apt/sources.list.d/raspi.list
95 sudo vi /etc/apt/sources.list
96 sudo apt update --allow-releaseinfo-change
97 sudo apt update -y
#to install k3s
124 sudo curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE=”644” sh -
125 sudo kubectl get nodes
126 reboot
127 sudo reboot
128 sudo su -
129 sudo iptables -F
130 sudo kubectl get nodes
131 env | grep -i kube
132 systemctl status docker
133 netstat -pnlt | grep 6443
134 sudo netstat -pnlt | grep 6443
135 sudo firewall-cmd --list-all
136 cd /var/log/journal
137 id -u www-data
138 sudo mkdir -p /var/lib/{pihole,wireguard}
139 $ sudo kubectl get nodes
140 sudo kubectl version
142 strace -eopenat kubectl version
144 sudo kubectl get nodes
146 sudo netstat -pnlt | grep 6443
#change fw rule
148 sudo iptables -A INPUT -p tcp --dport 6443 -j ACCEPT
149 vi /etc/fstab
#to install docker
162 sudo apt purge docker.io
163 sudo apt autoremove
164 sudo apt install docker.io
168 sudo docker pull portainer/portainer-ce:linux-arm
169 sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:linux-arm
170 netstat -tulpn
#to fix k3s on pi error - cgroup_memory=1 cgroup_enable=memory #2067
175 cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
177 set -o vi
178 sudo kubectl get nodes
179 sudo cat /var/lib/rancher/k3s/server/node-token
180 kubectl get svc -n kube-system
181 sudo kubectl get svc -n kube-system
#to fix iptables
3 swapoff -a
#to enable journalctl
7 vi /etc/systemd/journald.conf
8 sudo mkdir -p /var/log/journal
9 journalctl --list-boots
10 id -u www-data
11 kubectl version
12 kubectl cluster-info
root@raspberrypi:~# kubectl cluster-info
Kubernetes control plane is running at https://127.0.0.1:6443
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
13 vi /etc/ssh/sshd_config
14 kubectl get nodes
#to run docker as pi
38 sudo usermod -aG docker pi
39 cat /etc/group