David Igou

David Igou


Blog Archive Contact Dale
  • Motion + Raspberry Pi + Kubernetes
  • Kubernetes ingress whitelisting behind a loadbalancer
  • Switching to Ubuntu 64 bit for my Pis
  • Prometheus in Your Home
  • Simple Go Webhook Receiver
  • Kubernetes Local Storage
  • Secure Networking between local hosts and an AWS VPC
  • Nginx metrics via exporter sidecar
  • k3s tweaks
  • Securing a Kubernetes ingress with htpasswd
  • Running a static website on Kubernetes
  • Buildin this site again .. again
  • Openshift on AWS caveats
  • Prometheus
  • Building this site (again)
  • Kubernetes-2
  • Kubernetes
  • Plotting banned hosts
  • Fail2ban
  • Building this site [Legacy]
  • Switching to Ubuntu 64 bit for my Pis

    I’m not sure why I’ve been using Raspbian this entire time.

    I’m currently trying to get Rook working on my k3s arm64 cluster. I hit a road block the other day because the rbd module isn’t included in Raspbian and my ceph agents were failing to roll out. I spent several hours trying to compile the kernel and module for arm64 but ran into several issues, and every single guide on building an arm64 kernel differed. Eventually I discovered the Ubuntu 19 ARM64 release comes with this module, and has far more features than Raspbian.

    I don’t know why more new users don’t go with Ubuntu over Raspbian these days. New users struggle with headless setups and on Raspbian the workarounds can be hard to find via inexperienced Googling (Touch /boot/ssh and a wpa_supplicant config will be moved from /boot over to the OS) - But Ubuntu supports cloud-init OOTB. I’d been using an Ansible role to do some Raspian tweaks, but now I can just boot to proper config.

    Here’s the config for my first worker. After burning your image to your sd card, edit /boot/user-data:

    #cloud-config
    
    # This is the user-data configuration file for cloud-init. By default this sets
    # up an initial user called "ubuntu" with password "ubuntu", which must be
    # changed at first login. However, many additional actions can be initiated on
    # first boot from this file. The cloud-init documentation has more details:
    #
    # https://cloudinit.readthedocs.io/
    #
    # Some additional examples are provided in comments below the default
    # configuration.
    
    ssh_pwauth: false
    hostname: worker-1
    users:
    - name: igou
      groups: users
      ssh-authorized-keys:
        - ssh-rsa AAAAB3NzaC1yc2E[...]AAAADAQABAYw== igou@igou.io
      sudo: ['ALL=(ALL) ALL']
      shell: /bin/bash
    mounts:
      - [ 'UUID="5c7470b8-e526-4ae8-93ac-ee9c3d3a134d"', "/media/local-path-provisioner", "ext4", "defaults", "0", "2" ]
    
    ## Update apt database and upgrade packages on first boot
    package_update: true
    package_upgrade: true
    
    ## Install additional packages on first boot
    packages:
    - vim
    
    runcmd:
      - sed -i -e '$aAllowUsers igou' /etc/ssh/sshd_config
    

    For wireless support, you’d just add this section:

    network:
        version: 2
        ethernets:
            eth0:
                optional: true
                dhcp4: true
        # add wifi setup information here ...
        wifis:
            wlan0:
                optional: true
                access-points:
                    "YOUR-SSID-NAME":
                        password: "YOUR-NETWORK-PASSWORD"
                dhcp4: true
    

    Eventually I can configure this to autojoin my k3s cluster, but until then I’ll stick with k3sup.

    Raspbian is safe and stable, but if you’re going to try more experimental features, go with Ubuntu.