curl -LO https://github.com/hypriot/flash/releases/download/2.3.0/flash
chmod +x flash
sudo mv flash /usr/local/bin/flash
Connect your SD card
flash --userdata ./user-data.yaml
Insert the SD card on the RPi and boot the device.
Wait around 5 minutes.
scp -P 4444 [email protected]:~/kubeconfig ./
sed -i'' -e "s/localhost/servidor.local/g" kubeconfig
export KUBECONFIG=$PWD/kubeconfig
kubectl get pods -o wide --all-namespaces
sed -i'' -e "s/localhost/servidor.local/g" servidor-worker.yaml
flash --userdata ./servidor-worker.yaml
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-ds.yaml
kubectl -n kube-system edit configmap coredns -oyaml
apiVersion: v1
data:
Corefile: |
.:53 {
errors
health
rewrite name git.servidor.local traefik-ingress-service.kube-system.svc.cluster.local
rewrite name drone.servidor.local traefik-ingress-service.kube-system.svc.cluster.local
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
upstream
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
proxy . 1.1.1.1
cache 30
loop
reload
loadbalance
}
kubectl create -f storage-class.yaml
kubectl create ns gitea
kubectl create ns drone
kubectl create -f persistent-volumes.yaml
kubectl create -f volume-claims.yaml
kubectl create -f gitea.yaml
kubectl create -f drone.yaml