yangyang12138

导航

k8s安装

1.下载镜像

  首先下载脚本

    https://github.com/hummerstudio/k8s-docker-desktop-for-mac 

  下载完成后进入目录

    将images里镜像的版本改为docker对应的版本

      

 

 

k8s.gcr.io/kube-proxy:v1.16.5=gotok8s/kube-proxy:v1.16.5
k8s.gcr.io/kube-controller-manager:v1.16.5=gotok8s/kube-controller-manager:v1.16.5
k8s.gcr.io/kube-scheduler:v1.16.5=gotok8s/kube-scheduler:v1.16.5
k8s.gcr.io/kube-apiserver:v1.16.5=gotok8s/kube-apiserver:v1.16.5
k8s.gcr.io/coredns:1.6.2=gotok8s/coredns:1.6.2
k8s.gcr.io/pause:3.1=gotok8s/pause:3.1
k8s.gcr.io/etcd:3.3.15-0=gotok8s/etcd:3.3.15-0
k8s.gcr.io/kubernetes-dashboard-amd64=gotok8s/kubernetes-dashboard-amd64:v1.10.1

2.启动仪表盘

  下载 https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard 到本地

    然后执行kubectl apply -f recommended.yaml

    nohup kubectl proxy >/dev/null &

    启动后可登陆访问:http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login

    创建token

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

posted on 2020-07-06 02:28  杨杨09265  阅读(196)  评论(0编辑  收藏  举报