쿠버네티스 대시보드 ssh history

cp1@cp1:/home$ history
1 sudo tee /etc/netplan/00-installer-config.yaml >/dev/null <<'EOF'
network:
version: 2
ethernets:
enp0s3:
dhcp4: true
enp0s8:
dhcp4: no
addresses: [192.168.56.10/24]
EOF
2 pwds
3 pwd
4 ls
5 pwd
6 cd ..
7 sudo su
8 sudo tee /etc/netplan/00-installer-config.yaml >/dev/null <<'NETPLAN'
network:
version: 2
ethernets:
enp0s3:
dhcp4: true
enp0s8:
dhcp4: no
addresses: [192.168.56.105/24]
NETPLAN
9 sudo tee /etc/netplan/00-installer-config.yaml >/dev/null <<'NETPLAN'
network:
version: 2
ethernets:
enp0s3:
dhcp4: true
enp0s8:
dhcp4: no
addresses: [192.168.56.105/24]
NETPLAN
10 sudo netplan apply
11 ip -br a
12 ping -c 2 192.168.56.104
13 sudo /usr/local/bin/k3s-uninstall.sh
14 which k3s
15 sudo systemctl list-units | grep k3s
16 curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - --node-ip 192.168.56.105 --flannel-iface enp0s8
17 kubectl get nodes -o wide
18 sudo cat /var/lib/rancher/k3s/server/node-token
19 ubectl get nodes -o wide
20 kubectl get nodes -o wide
21 kubectl get pods -A
22 kubectl get nodes -o wide
23 clear
24 kubectl get nodes -o wide
25 kubectl get pods -A
26 kubectl create deployment nginx-test --image=nginx
27 kubectl get pods
28 kubectl expose deployment nginx-test --type=NodePort --port=80
29 kubectl get svc
30 nginx-test NodePort 10.43.24.185 <none> 80:31234/TCP
31 kubectl get endpoints nginx-test -o wide
32 kubectl get nodes -o wide
33 kubectl -n kube-system get deploy,svc | egrep "traefik|metrics" || true
34 kubectl -n kube-system get svc traefik -o widekubectl create deploy whoami --image=traefik/whoami
35 kubectl expose deploy whoami --port 80
36 kubectl create deployment whoami --image=traefik/whoami
37 kubectl expose deployment whoami --port 80
38 kubectl patch svc whoami -p '{"spec":{"type":"NodePort"}}'
39 kubectl get svc whoami
40 kubectl apply -f - <<'EOF'
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: whoami
spec:
rules:
- host: whoami.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: whoami
port:
number: 80
EOF
41 192.168.56.105 whoami.local
42 kubectl apply -f ing-whoami.yaml
43 kubectl get pod -o wide
44 kubectl create deploy whoami --image=traefik/whoami
45 kubectl expose deploy whoami --port 80
46 kubectl get pod -o wide
47 ls
48 kubectl get pods -o wide
49 echo "192.168.56.105 whoami.local" | sudo tee -a /etc/hosts
50 curl http://whoami.local/
51 kubectl get deploy whoami
52 kubectl get svc whoami
53 kubectl top nodes
54 kubectl top pods -A | head
55 curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
56 helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
57 helm repo update
58 helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
59 export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
60 helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
61 kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443 --address 0.0.0.0
62 kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443 --address 0.0.0.0 >/tmp/kdash-pf.log 2>&1 &
63 tail -n 20 /tmp/kdash-pf.log
64 kubectl -n kubernetes-dashboard create token admin-user
65 kubectl -n kubernetes-dashboard create serviceaccount admin-user
66 kubectl create clusterrolebinding admin-user --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard:admin-user
67 kubectl -n kubernetes-dashboard create token admin-user
68 history
cp1@cp1:/home$
귀챃아서 다 복사함