# WireGuard cluster example This example will create 5 kubernetes nodes using k3s: a master and 4 workers. All VMs have public IPs, which can be used to publish ports. To create the VMs, run: ``` ./create_vms.sh ``` And to deploy Kubernetes: ``` ./deploy.sh ``` After this, you can deploy an nginx service to all nodes: ``` ./nginx_service.sh ``` ## Succesful output Assuming everything went fine, at the end you should see something like this: ``` daemonset.apps/nginx-daemonset unchanged service/nginx-service unchanged NGINX DEPLOYED! PLEASE FIND DETAILS OF PODS AND SERVICES BELOW: NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod/nginx-daemonset-2kqhl 1/1 Running 0 3m38s 10.42.1.3 k3s-node-4 pod/nginx-daemonset-hftsr 1/1 Running 0 3m38s 10.42.0.8 k3s-master pod/nginx-daemonset-nqfsf 1/1 Running 0 3m38s 10.42.2.3 k3s-node-3 pod/nginx-daemonset-q8hm6 1/1 Running 0 3m38s 10.42.3.4 k3s-node-2 pod/nginx-daemonset-v97p8 1/1 Running 0 3m38s 10.42.4.3 k3s-node-1 NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR service/kubernetes ClusterIP 10.43.0.1 443/TCP 7m36s service/nginx-service NodePort 10.43.118.196 80:30080/TCP 3m38s app=nginx TO CHECK IF NGINX IS WORKING, USE THE FOLLOWING COMMANDS: curl http://149.36.48.101:30080 curl http://149.36.48.104:30080 curl http://149.36.48.105:30080 curl http://149.36.48.102:30080 curl http://149.36.48.103:30080 ``` ## Tutorial A more elaborate tutorial can be found [in the docs](http://docs.detee.ltd/tutorials/kubernetes).