Orientsoft / kubekit

A Kubernetes deployment toolkit for offline environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

有机会支持k8s 1.9吗?

caicaicai opened this issue · comments

或者说我自己想升级到1.9版本,需要做哪些事情。

有的,1.9支持还在计划中

1.9需要专门打包1.9的离线包,也就是更新package里面的离线安装包部分

我把一套1.9的包都下好了, 准备自己替换下试试看

我简单看了下项目, 核心工作都在 docker.sh master.sh node.sh, 所以我升级包的时候 主要针对 这三个脚本进行升级,这样做有什么问题嘛?

是的,如果提取好了离线包,主要就是针对这三个脚本进行调优

etcd-amd64_3.1.10.tar k8s-dns-dnsmasq-nanny-amd64_1.14.7.tar k8s-dns-sidecar-amd64_1.14.7.tar kube-controller-manager-amd64_v1.9.1.tar kubernetes-dashboard-amd64_v1.8.2.tar pause-amd64_3.1.tar
flannel_v0.9.1-amd64.tar k8s-dns-kube-dns-amd64_1.14.7.tar kube-apiserver-amd64_v1.9.1.tar kube-proxy-amd64_v1.9.1.tar kube-scheduler-amd64_v1.9.1.tar
我更新了所有的镜像 和 k8s.tar.gz的 rpm包

调整完 master.sh之后 尝试安装
(1/6) Start to load images for Kubernetes master...
Exit Status: 1

Failed to initialize Kubernetes master node..

日志就这样,
然后我看脚本里面会把镜像放到 /tmp/k8s/下面, 去那边检查下,发现少了个 kubernetes-dashboard-amd64_v1.8.2.tar, 然后我有仔细检查了脚本 ,该改的地方都改了,不知道为什么会这样。

然后我把脚本里面的 load image注释掉,自己手动load了那个镜像,然后 安装有卡在
(4/6) Start to initialize Kubernetes master...
这里了,不动了就。。

然后我手动执行了
kubeadm init --kubernetes-version=v1.9.1 --pod-network-cidr=10.96.0.0/12

发现日志这样
[root@localhost package]# kubeadm init --kubernetes-version=v1.9.1 --pod-network-cidr=10.96.0.0/12
[init] Using Kubernetes version: v1.9.1
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
[WARNING FileExisting-crictl]: crictl not found in system path
[certificates] Using the existing ca certificate and key.
[certificates] Using the existing apiserver certificate and key.
[certificates] Using the existing apiserver-kubelet-client certificate and key.
[certificates] Using the existing sa key.
[certificates] Using the existing front-proxy-ca certificate and key.
[certificates] Using the existing front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Using existing up-to-date KubeConfig file: "admin.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "kubelet.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "controller-manager.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
[init] This might take a minute or longer if the control plane images have to be pulled.

意思是 缺少镜像 在pull镜像吗?

感觉是在pull什么镜像,下午找个能爬墙的机器试试看

原因是我一个依赖镜像版本弄错了,在下载那个镜像。
目前我master节点起来了,dashboard也能看到没问题。
我在部署node的时候,脚本出错,然后加个--discovery-token-unsafe-skip-ca-verification 就能正常加入到mater节点。
`
[root@localhost ~]# kubeadm join --skip-preflight-checks --discovery-token-unsafe-skip-ca-verification --token=9f2f53.b703424b5a86dc56 10.255.255.80:6443
Flag --skip-preflight-checks has been deprecated, it is now equivalent to --ignore-preflight-errors=all
[preflight] Running pre-flight checks.
[WARNING FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists
[WARNING FileExisting-crictl]: crictl not found in system path
[discovery] Trying to connect to API Server "10.255.255.80:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://10.255.255.80:6443"
[discovery] Cluster info signature and contents are valid and no TLS pinning was specified, will use API Server "10.255.255.80:6443"
[discovery] Successfully established connection with API Server "10.255.255.80:6443"

This node has joined the cluster:

  • Certificate signing request was sent to master and a response
    was received.
  • The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the master to see this node join the cluster.
`
看起来是成功了,但是 到mater上面 get nodes 看不到这个节点,也没报错,不知道啥原因。

@caicaicai 请问你1.9的离线包是在哪里下载的?

在我国外服务器上,yum 安装 然后下载模式, master节点跑起来没啥问题,就是 node节点 join完了,master看不到, 你要的话 我可以发给你, 最近忙别的,那天做一半卡在那就没往后面研究了。

@caicaicai 已经找到1.9的包了,这两天我会集成测试一下

@caicaicai V1.9.2 已经支持,安装包也已经发布,可以下载最新V1.9.2安装包试试,参考首页README

牛逼,今天已经装上了,很好,感谢。