#!/bin/sh
# Bootstrap OpenFaaS on Packet.NET Type 2A (arm64) hardware with Kubernetes 1.9 and Weave
# Notes: before starting install kubeadm / kubectl via https://blog.alexellis.io/kubernetes-in-10-minutes/
# Alex Ellis 2017 (c) OpenFaaS
# Changes for Kubernetes 1.9: Edward Vielmetti, Packet.net 2018 (work in progress)
# completely wipe out whatever existing configuration you have
cd ; kubeadm reset && rm -rf .kube
# kubernetes requires that you run with swap turned off
swapoff -a
# put the api server address on the private IP address provided by packet
# put the pod server network on 192.168.0.0/16
# read more: https://www.packet.net/developers/guides/microservices-in-kubernetes-with-weave-cloud-and-bare-metal/
kubeadm init --apiserver-advertise-address=$PUBLIC_IP --pod-network-cidr=192.168.0.0/16 --kubernetes-version stable-1.9
# drop the kube config file in the right place
cd ; rm -rf .kube
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
# running a single node, you'll want to schedule on master too
kubectl taint nodes --all node-role.kubernetes.io/master-
# install weave per package directions
# this works for kubernetes 1.9
curl -SL "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.IPALLOC_RANGE=192.168.0.0/16" | kubectl apply -f -
# grab faas-netes
# we're going to work in a branch
mkdir -p $HOME/go/src/github.com/openfaas
cd $HOME/go/src/github.com/openfaas/
git clone https://github.com/openfaas/faas-netes
echo GRAB THE RIGHT BRANCH HERE
# install faas-netes
cd $HOME/go/src/github.com/openfaas/faas-netes
kubectl apply -f namespaces.yml,./yaml_arm64
#
kubectl get all -n kube-system
kubectl get all
-
-
Save vielmetti/8c6c7551c6ce9ba021ff0f1803ae9f22 to your computer and use it in GitHub Desktop.
Bootstrap OpenFaaS on ARM64
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment