kubernetes mac本地环境安装

kubernetes mac本地环境安装

1,mac 本地集群搭建

下载:https://download.docker.com/mac/edge/Docker.dmg

安装

2,镜像安装

k8s.gcr.io/kube-proxy:v1.15.5=gotok8s/kube-proxy:v1.15.5
k8s.gcr.io/kube-controller-manager:v1.15.5=gotok8s/kube-controller-manager:v1.15.5
k8s.gcr.io/kube-scheduler:v1.15.5=gotok8s/kube-scheduler:v1.15.5
k8s.gcr.io/kube-apiserver:v1.15.5=gotok8s/kube-apiserver:v1.15.5
k8s.gcr.io/coredns:1.3.1=gotok8s/coredns:1.3.1
k8s.gcr.io/pause:3.1=gotok8s/pause:3.1
k8s.gcr.io/etcd:3.3.10=gotok8s/etcd:3.3.10

3,perfernce

4,启动成功后,切换运行上下文

kubectl config use-context docker-desktop

5,查看状态

$ kubectl cluster-info
$ kubectl get nodes
$ kubectl describe node

6,安装dashbord

安装

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
开启访问代理
kubectl proxy

访问
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

获取token
kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}'

完毕,国内会有镜像下不下来的问题。自行解决把。FQ。

发表评论