News:

Brought to you NINE-T Co.,ltd.

Main Menu

Recent posts

#1
Kubernetes / Re: การติดตั้ง Kubernetes Clus...
Last post by jimmy - August 08, 2025, 07:30:51 PM
14. ทำการติดตั้ง Calico CNI
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.30.2/manifests/operator-crds.yamlkubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.30.2/manifests/tigera-operator.yaml

15. ดาวน์โหลด configure
curl https://raw.githubusercontent.com/projectcalico/calico/v3.30.2/manifests/custom-resources.yaml -O

*** เลข version อาจจะต้องเปลี่ยนเป็นตัวล่าสุด กรุณาเช็คในเว็บ Calico

16. แก้ค่า network ให้ตรงกับ network ที่ท่านใช้
sed -i 's/cidr: 192\.168\.0\.0\/16/cidr: 10.244.0.0\/16/g' custom-resources.yaml
โดยเราใช้ 10.244.0.0 เป็นค่าของเรา

17. แก้ไขไฟล์เข้าระบบ

kubectl create -f custom-resources.yaml
#2
Kubernetes / Re: การติดตั้ง Kubernetes Clus...
Last post by jimmy - August 08, 2025, 07:26:50 PM
8. ทำการติดตั้ง docker ด้วยคำสั่ง

sudo dnf install dnf-plugins-core -y
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl enable --now docker
9. ทำการสร้างไฟล์ config ของ containerd ด้วยคำสั่ง

sudo sh -c "containerd config default > /etc/containerd/config.toml"sudo sed -i 's/ SystemdCgroup = false/ SystemdCgroup = true/' /etc/containerd/config.tomlsudo systemctl restart containerd.service
10. ทำการติดตั้ง kubernetes ในทุกโหนด ด้วยคำสั่งเพิ่ม repo ก่อน

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v1.33/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.33/rpm/repodata/repomd.xml.key
EOF


11. ทำการติดตั้งโปรแกรมที่จำเป็น
sudo dnf install curl ca-certificates -y

12. ทำการติดตั้ง

sudo apt install kubelet kubeadm kubectl -y
13. คราวนี้ ทำการพิมพ์คำสั่ง ---เฉพาะใน master node----
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
หลังจากนั้น ระบบจะบอก ข้อมูลให้ท่านพิมพ์ โดยท่านจะต้องพิมพ์ตาม บนหน้าจอ

mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/config
นอกจากนั้นท่านจะเห็นว่ามีข้อมูลการ join cluster ซึ่งท่านก็อปปี้และไปพิมพ์ใน worker node


#3
Kubernetes / Re: การติดตั้ง Kubernetes Clus...
Last post by jimmy - August 08, 2025, 07:19:11 PM
6. ทำการสร้างไฟล์ เพื่อแก้ไขค่าเกี่ยวกับเน็ตเวิร์ก
sudo nano   /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables  = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward   = 1

7. พิมพ์ คำสั่งเพื่อโหลดค่าใหม่
sudo sysctl --system
#4
Kubernetes / การติดตั้ง Kubernetes Cluster ...
Last post by jimmy - August 08, 2025, 07:13:26 PM
จะต้องบอกว่า วิธีการนี้ สามารถนำไปใช้กับ Linux แทบทุกตระกูล ไม่ว่าจะเป็น AlmaLinux หรือ Ubuntu
งั้นเรามาเริ่มกันเลย

1. ทำการแก้ไขไฟล์ /etc/hosts โดยการเพิ่ม host และ ip ของแต่ละตัว เช่น

10.166.1.2 k8s-master
10.166.1.3 k8s-worker1
10.166.1.4 k8s-worker2

2. ทำการ ตั้งชื่อ hostname ในแต่ละ host ให้ตรงกับที่ตั้งไว้ใน /etc/hosts ด้วยคำสั่ง
ใน host แรก
sudo hostnamectl set-hostname "k8s-master"
ใน host 2
sudo hostnamectl set-hostname "k8s-worker2"
ใน host 3
sudo hostnamectl set-hostname "k8s-worker3"

3. ทำการ disable swap ด้วยคำสั่ง ในทุกๆ โหนด/host
sudo swapoff -a
4. ทำการโหลด module ที่จำเป็น ในทุกๆ โหนด/host
sudo modprobe overlaysudo modprobe br_netfilter
5. สร้างไฟล์เพื่อให้โหลดทุกครั้งที่รีบูต ในทุกๆ โหนด
sudo tee /etc/modules-load.d/k8s.conf <<EOF
overlay
br_netfilter
EOF
#5
Proxmox VE / Re: Upgrade Proxmox 8.4.1 to 9...
Last post by jimmy - July 28, 2025, 07:21:48 PM
สำหรับ video ดูได้จากที่นี่เลย
#6
Proxmox VE / Upgrade Proxmox 8.4.1 to 9 BET...
Last post by jimmy - July 28, 2025, 05:48:01 PM
ก่อนทำการอัพเกรด ท่านจะต้อง
1. ใช้ Proxmox VE 8.4.1 เป็นอย่างนั้น เพราะฉะนั้น ท่านจะต้องทำการ ใช้คำสั่ง apt update && apt upgrade เพื่อให้ PVE ของท่านเป็นปัจจุบันที่สุด
2. Ceph ที่ใช้ จะต้องเป็น 19.2 Squid และหากยังไม่ได้ใช้ก็ต้องอัพเกรดก่อน
3. หากท่านใช้ Proxmox Backup Server (PBS) จะต้องทำการอัพเกรดเป็น 4 ก่อน

เริ่มทำการอัพเกรด
1. ใช้คำสั่ง pve8to9 เพื่อเช็คความพร้อม หากขึ้นสีเขียวทุกตัว และ ไม่มีสีแดงก็ทำข้อต่อไปได้เลย
pve8to9

2. ใช้คำสั่ง

sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/pve-enterprise.list

3. ทำการเพิ่ม PVE 9 Repository

cat > /etc/apt/sources.list.d/proxmox.sources << EOF
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-test
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF

มาถึงจุดนี้ท่านจะต้องทำการ remark repo ตัวเดิมในระบบทั้งหมด เช็คใน /etc/apt/sources.list.d/ ถ้ามีไฟล์เดิมอยู่ จะต้องทำการ remark

4. เพิ่ม repo สำหรับ Ceph

cat > /etc/apt/sources.list.d/ceph.sources << EOF
Types: deb
URIs: http://download.proxmox.com/debian/ceph-squid
Suites: trixie
Components: test
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF

6. พิมพ์คำสั่งเพื่อทำการอัพเดท index
apt update

7. ทำการอัพเดทและตอบคำถาม แต่ละข้อตาม video

apt dist-upgrade

8. ทำการ reboot

reboot

9. ทำการปรับเปลี่ยน repo ไปใช้รูปแบบใหม่ด้วยคำสั่ง

apt modernize-sources

#7
Proxmox VE / การติดตั้ง InfluxDB 2 บน Ubunt...
Last post by jimmy - July 28, 2025, 01:00:05 PM
(1) ดาวน์โหนด gpg key

curl --silent --location -O https://repos.influxdata.com/influxdata-archive.key

(2) ทำการเพิ่มคีย์ ในระบบและทำการสร้าง repo

gpg --show-keys --with-fingerprint --with-colons ./influxdata-archive.key 2>&1 \
| grep -q '^fpr:\+24C975CBA61A024EE1B631787C3D57159FC2F927:$' \
&& cat influxdata-archive.key \
| gpg --dearmor \
| sudo tee /etc/apt/trusted.gpg.d/influxdata-archive.gpg > /dev/null \
&& echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main' \
| sudo tee /etc/apt/sources.list.d/influxdata.list


(3) ติดตั้ง influxdb
sudo apt-get update && sudo apt-get install influxdb2

(4) ทำการ start service
sudo systemctl start influxdb

และเข้าจัดการทางเว็บที่ http://<ip>:8086

#8
Windows 10 11 12 / Re: แก้ error This PC doesn't ...
Last post by jimmy - July 20, 2025, 12:46:59 PM
ขอเสริมว่า Windows 11 นั้นมี system requirements ดังต่อไปนี้
TPM 2.0
Secure Boot
4GB RAM
64GB diskspace
#9
Windows 10 11 12 / แก้ error This PC doesn't curr...
Last post by jimmy - July 20, 2025, 12:24:15 PM
ไปดูกันเลย วิธีการ bypass TPM ง่ายมาก ซึ่งบางคนมีปัญหาในการติดตั้ง Windows 11 บน VM และเกิดปัญหาดังกล่าว
#10
Proxmox VE / Re: INACCESSIBLE BOOT DEVICE ห...
Last post by jimmy - July 16, 2025, 08:34:19 AM
3. บูต และ ติดตั้ง virtIO driver
4. ทำการ detach และ attach อีกครั้ง และ ครั้งนี้เลือกเป็น VirtIO
5. ก็จะทำงานได้เป็นปกติ