k3s
"The certified Kubernetes distribution built for IoT & Edge computing"
https://k3s.io/
k3sup
https://github.com/alexellis/k3sup
checking config
curl -sfL https://raw.githubusercontent.com/rancher/k3s/master/contrib/util/check-config.sh | sh -
k3sup
- https://blog.alexellis.io/test-drive-k3s-on-raspberry-pi/
- https://alexellisuk.medium.com/walk-through-install-kubernetes-to-your-raspberry-pi-in-15-minutes-84a8492dc95a
arkade
- https://github.com/alexellis/arkade
OpenFaaS
β kube-k3s arkade install openfaas
Using kubeconfig: /Users/bluer/Developer/kube-k3s/kubeconfig
Using helm3
Node architecture: "arm"
Client: "x86_64", "Darwin"
2021/01/13 15:40:28 User dir established as: /Users/bluer/.arkade/
https://get.helm.sh/helm-v3.1.2-darwin-amd64.tar.gz
/Users/bluer/.arkade/bin/helm3/darwin-amd64 darwin-amd64/
/Users/bluer/.arkade/bin/helm3/helm darwin-amd64/helm
/Users/bluer/.arkade/bin/helm3/README.md darwin-amd64/README.md
/Users/bluer/.arkade/bin/helm3/LICENSE darwin-amd64/LICENSE
2021/01/13 15:40:30 extracted tarball into /Users/bluer/.arkade/bin/helm3: 3 files, 0 dirs (1.566950661s)
"openfaas" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "openfaas" chart repository
Update Complete. β Happy Helming!β
VALUES values-armhf.yaml
Command: /Users/bluer/.arkade/bin/helm3/helm [upgrade --install openfaas openfaas/openfaas --namespace openfaas --values /var/folders/l0/cwwfcrzd7375kkrhqgn0dv7h0000gn/T/charts/openfaas/values-armhf.yaml --set gateway.replicas=1 --set queueWorker.replicas=1 --set basic_auth=true --set clusterRole=false --set operator.create=false --set openfaasImagePullPolicy=IfNotPresent --set faasnetes.imagePullPolicy=Always --set basicAuthPlugin.replicas=1 --set ingressOperator.create=false --set queueWorker.maxInflight=1 --set serviceType=NodePort --set gateway.directFunctions=true]
Release "openfaas" does not exist. Installing it now.
NAME: openfaas
LAST DEPLOYED: Wed Jan 13 15:40:36 2021
NAMESPACE: openfaas
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To verify that openfaas has started, run:
kubectl -n openfaas get deployments -l "release=openfaas, app=openfaas"
=======================================================================
= OpenFaaS has been installed. =
=======================================================================
# Get the faas-cli
curl -SLsf https://cli.openfaas.com | sudo sh
# Forward the gateway to your machine
kubectl rollout status -n openfaas deploy/gateway
kubectl port-forward -n openfaas svc/gateway 8080:8080 &
# If basic auth is enabled, you can now log into your gateway:
PASSWORD=$(kubectl get secret -n openfaas basic-auth -o jsonpath="{.data.basic-auth-password}" | base64 --decode; echo)
echo -n $PASSWORD | faas-cli login --username admin --password-stdin
faas-cli store deploy figlet
faas-cli list
# For Raspberry Pi
faas-cli store list \
--platform armhf
faas-cli store deploy figlet \
--platform armhf
# Find out more at:
# https://github.com/openfaas/faas
Thanks for using arkade!
Kubernetes Dashboard
β kube-k3s arkade install kubernetes-dashboard
Using kubeconfig: /Users/bluer/Developer/kube-k3s/kubeconfig
Node architecture: "arm"
# To create the Service Account and the ClusterRoleBinding
# @See https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md#creating-sample-user
cat <<EOF | kubectl apply -f -
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard
---
EOF
#To forward the dashboard to your local machine
kubectl proxy
#To get your Token for logging in
kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user-token | awk '{print $1}')
# Once Proxying you can navigate to the below
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login