Skip to content

Instantly share code, notes, and snippets.

@skobba
Last active February 17, 2021 04:59
Show Gist options
  • Save skobba/1a69626c4efccc2fc19b28d73f40728c to your computer and use it in GitHub Desktop.
Save skobba/1a69626c4efccc2fc19b28d73f40728c to your computer and use it in GitHub Desktop.
Deploying Kubernetes on SmartIOS

Ref

https://www.youtube.com/watch?v=rA0pcmqpRx4&t=3s

k8c

{
  "brand": "bhyve",
  "alias": "bionic-k8-master",
  "ram": "2048",
  "vcpus": "2",
  "resolvers": [
    "10.40.0.1",
    "1.1.1.1"
  ],
  "nics": [
    {
      "vlan_id": 40,
      "nic_tag": "trunk",
      "gateway": "10.40.0.1",
      "netmask": "255.255.255.0",
      "ip": "10.40.0.50",
      "model": "virtio",
      "primary": true
    }
  ],
  "disks": [
    {
      "image_uuid": "c9db249c-93ba-4507-9fa4-b4d0f81265fc",
      "boot": true,
      "model": "virtio"
    }
  ],
  "customer_metadata": {
    "root_authorized_keys": "ssh-rsa AAAA......",
    "cloud-init:user-data": "#cloud-config\n\nresolv_conf:\n  nameservers: ['8.8.8.8']\n\nruncmd:\n - curl -s \"https://packages.cloud.google.com/apt/doc/apt-key.gpg\" | apt-key add -\n - echo 'deb http://apt.kubernetes.io/ kubernetes-xenial main' >/etc/apt/sources.list.d/kubernetes.list\n - apt-get update\n - apt-get upgrade -y\n - apt-get install -y docker.io\n - apt-get install -y kubelet kubeadm kubectl\n - systemctl enable docker\n - systemctl start docker\n - echo 'net.bridge.bridge-nf-call-iptables=1' >>/etc/sysctl.conf\n - sysctl -p\n - swapoff -a\n - kubeadm init"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment