ARM64 Kubernetes Nginx Traefik Ingress Load Balance

My original target purpose is very simple, build deploy several webserver and assigned a external ip for internet to access it.

Most kubernetes newbie install guide won’t mention how to do that. actually that’s very simple, for external ip, it needs a load balance controller like metallb for create a external ip address to access web server. and an Ingress contoller like Traefik for http/https route to right pods .

Read more »

Raspberry 4 Pi + Kubuntu

買了二塊 Raspberry 4 Pi 回來,本來是準備裝 K8s 的,但是在這之前要先跑個 ubuntu image 才對.

我買 Raspberry 4 Pi 的時候知道他要用 5V3A 的電源,但是我沒有想到我自己沒有 5V3A 的 USB 變壓器,手機用的含 Apple 87W USB-C 變壓器都不足瓦
Apple 87W 只能輸出 5V 2.4A
最後找了一個 Sony 可以輸出 5V 2.7A 才可以用,所以如果要買 Raspberry Pi 4 的人請注意一下

另外這一塊的外接是 Micro-HDMI,我也忘了買,記得還要加買 SD Card

Read more »

Python 取得 PM2.5 和天氣資訊

最近終於將很久之前就說要架的室內 PM 2.5 偵測弄起來,上一版是用 Cacti 做的,但是有點過時了,這一版是用 Grafana + Prometheus 做的,看起來就漂亮多了

不過架上去之後的問題是,想比較數值,但是又不想再組一套系統出來,畢竟感測器也是成本,不如就用現成的氣象和環保局的數據吧,反正都只是參考用的,看個大概就好了

Read more »

QEMU Network Problem When Run With Docker

如果 Docker 和 QEMU 同時執行時,QEMU 內部透過 tap interface bridge 到 host network 的網路會出不去

這個問題的原因是 Docker 起來之後,會將 iptables 的 packet forward 預設變成 DROP

這時可以在 Docker 起來的時候將 bridge interface 加到 iptables 規則內即可,首先編輯 systemd docker service

Read more »

Install Kubernetes on ARM64 Ubuntu 18.04 (with QEMU)

Install Kubernetes on Ubuntu 18.04 is very easy now, but only for x86 platform. If on ARM64 environment, it might have some other problem.
Some old article mentioned a lot of information but software version is too old for deploy a new version software.

After a lot of time to have research, here is instruction for how to install Kubernetes on ARM64 Ubuntu 18.04

Read more »

Ubuntu 18.04 Change Mac Address on QEMU via Netplan

This is a quick note about how to modify mac address for qemu image with ubuntu 18.04 cloud image.

but I have not found a working way only change mac address in system

Read more »

Lexus NX300H BMW X3 VOLVO XC60 賞車後記

本來以為之前買的車還可以再戰幾年,不過這幾年年紀虛長,愈來愈感覺到開車注意力下降的次數和時間都愈來愈長。最近看到最近的車子都有很多新的主動被動安全防護措施,就會有點心動,心動不如行動,然後就展開了一場快二年的看車之旅。

目標規格如下
1. SUV 車系,考量到現有的停車位,最大車寬要 190CM 以下
2. 全速域主動跟車跟車道維持系統(一般有這個就有自動剎停)
3. 360 度環景
4. 抬頭顯示器
5. 預算 150~200 左右

我一開始只喜歡打算看 VOLVO XC60 ,畢竟戰車的印像深入人心
但是陸續也看了一些其他車,就簡單寫寫心得吧

Read more »

DPDK PKTGEN

This is personal note for dpdk pktgen.
now (2019/08), if wants to run dpdk pktgen, it cannot use ubuntu default dpdk packages, it needs to compile pktgen from source code.

Read more »

Ubuntu 18.04 ARM64 DPDK in VM (QEMU)

DPDK is a very popular infrastructure in high speed packet process domain, some applications will used the same architecture to process packet, like EPC.

For Ubuntu 18.04, it used dpdk 17.11, it not good for some other application like dpdk pktgen, but enough for testpmd and l3fwd test. here is some personal note for setup whole environment.

DPDK in QEMU archeticture
Read more »

Ubuntu Change Default Mac Address

Ubuntu used netplan as new network manager, but it’s different with previous version.

First create a new file /etc/systemd/network/10-override-mac.link

[Match]
MacAddress=52:54:00:12:34:56

[Link]
MACAddress=52:54:00:12:34:58

52:54:00:12:34:56 is old mac, and 52:54:00:12:34:58 is new mac .

Second, modify /etc/netplan/01-netcfg.yaml, create match: and macaddress field , example

network:
version: 2
ethernets:
eth0:
dhcp4: true
match:
macaddress: ’52:54:00:12:34:58′
set-name: eth0

ref.

Netplan not spoofing MAC as expected