Notice The installation consumes less local resources. Therefore, it is suitable for learning and testing and is not recommended for production

The premise condition

  • Install the docker
  • Install kubectl installation guide

Methods a minikube

Minikube Installation Guide to start

minikube start
Copy the code

Install ingress in cluster:

minikube addons enable ingress
Copy the code

Kind (Kubernets in docker)

Spins up a Kind Cluster Then leading up a Kind Cluster:

cat <<EOF | kind the create cluster - image = kindest/node: v1.18.15 - config = - kind: cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane kubeadmConfigPatches: - | kind: InitConfiguration nodeRegistration: kubeletExtraArgs: node-labels: "ingress-ready=true" extraPortMappings: - containerPort: 80 hostPort: 80 protocol: TCP - containerPort: 443 hostPort: 443 protocol: TCP EOF
Copy the code

Install the ingress:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
Copy the code

Install the results

I use the MAC system, use mode 2 through Kind installation

Check the health status of the K8S

kubectl get cs
Copy the code

View the results

NAME the STATUS MESSAGE ERROR scheduler Unhealthy Get http://127.0.0.1:10251/healthz: dial TCP 127.0.0.1:10251: connect: Connection refused the controller - manager Unhealthy Get http://127.0.0.1:10252/healthz: dial TCP 127.0.0.1:10252: connect: connection refused etcd-0 Healthy {"health":"true"}
Copy the code