注意 安装后占用本机资源较少,适合学习测试使用,不建议用于生产
前提条件
- 安装 docker
- 安装 kubectl 安装指南
方式一 minikube
minikube 安装指南
启动
| 1 | bash复制代码minikube start | 
集群中安装 ingress:
| 1 | bash复制代码minikube addons enable ingress | 
方式二 kind (Kubernets in docker)
kind 安装指南
Then spins up a kind cluster:
| 1 | bash复制代码cat <<EOF | kind create cluster --image=kindest/node:v1.18.15 --config=- | 
安装 ingress:
| 1 | bash复制代码kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml | 
安装结果
我使用mac系统,使用方式二 通过kind安装
检查安装k8s健康状态
| 1 | bash复制代码kubectl get cs | 
查看结果
| 1 | bash复制代码NAME STATUS MESSAGE ERROR | 
本文转载自: 掘金