Install k3s on master node:
curl -sfL https://get.k3s.io | sh -
# get token
cat /var/lib/rancher/k3s/server/node-token
Install k3s on worker nodes as agents:
apiVersion: templates.gatekeeper.sh/v1beta1 | |
kind: ConstraintTemplate | |
metadata: | |
name: lbtypesvcnotallowed | |
spec: | |
crd: | |
spec: | |
names: | |
kind: LBTypeSvcNotAllowed | |
listKind: LBTypeSvcNotAllowedList |
apiVersion: constraints.gatekeeper.sh/v1beta1 | |
kind: LBTypeSvcNotAllowed | |
metadata: | |
name: deny-lb-type-svc-dev-ns | |
spec: | |
match: | |
kinds: | |
- apiGroups: [""] | |
kinds: ["Service"] | |
namespaces: |
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: check-resources | |
spec: | |
validationFailureAction: enforce | |
rules: | |
- name: check-pod-resources | |
match: | |
resources: |
package main | |
import ( | |
"fmt" | |
"log" | |
"math/rand" | |
"net/http" | |
"time" | |
"github.com/prometheus/client_golang/prometheus" |
for node in node1 node2 node3;do | |
multipass launch -n $node | |
done | |
# Init cluster on node1 | |
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -" | |
# Get node1's IP | |
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}') |
version: "3.3" | |
services: | |
################################################ | |
#### Traefik Proxy Setup ##### | |
############################################### | |
traefik: | |
image: traefik:v2.0 | |
restart: always |
Install k3s on master node:
curl -sfL https://get.k3s.io | sh -
# get token
cat /var/lib/rancher/k3s/server/node-token
Install k3s on worker nodes as agents:
version: '3' | |
volumes: | |
caddy_data: | |
caddy_config: | |
services: | |
caddy: | |
image: caddy | |
volumes: | |
- caddy_data:/data | |
- caddy_config:/config |
# Install QEMU OSX port with ARM support | |
sudo port install qemu +target_arm | |
export QEMU=$(which qemu-system-arm) | |
# Dowload kernel and export location | |
curl -OL \ | |
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie | |
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie | |
# Download filesystem and export location |
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.