Skip to content

Kubernetes materials

Using Kubernetes

https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/

Check original source

https://a4937.medium.com/deploying-own-kubernetes-infrastruture-on-digitalocean-2f0685017281

METALLB

BARE METAL KUBERNETES

Important learing:

When you enable metallb you should limit ip address (look below) in host machine ip. This enable expose kubernetes clusters loadbalancer to internet

Read more at: deploying-own-kubernetes-infrastruture-on-digitalocean

echo "192.168.1.16-192.168.1.16" | sudo microk8s enable metallb

Let's active service and expose it to internet

# If your metallb is not configured correctly
# We will remove it totally
microk8s disable metallb
# Check you hostip first and activate metallb with limited ip set
echo "192.168.1.16-192.168.1.16" | sudo microk8s enable metallb

kubectl create deploy nginx-testix --image nginx:latest
kubectl get all -A
kubectl remove deploy nginx-testix --port 80 --type LoadBalancer

First try out to create ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.1.16-192.168.1.16