Kubernetes 1.15部署日记-使用kubeadm--<5-6>
5.配置pod网络
5.1下载calico 网络配置文件
[root@k8s-1 libj]# curl -O https://docs.projectcalico.org/v3.6/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 19533 100 19533 0 0 9207 0 0:00:02 0:00:02 --:--:-- 9204 [root@k8s-1 libj]# ls calico.yaml kubeadm.yaml [root@k8s-1 libj]# vim calico.yaml
5.2直接创建calico网络
[root@k8s-1 libj]# kubectl apply -f calico.yaml configmap/calico-config created customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org created clusterrole.rbac.authorization.k8s.io/calico-kube-controllers created clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers created clusterrole.rbac.authorization.k8s.io/calico-node created clusterrolebinding.rbac.authorization.k8s.io/calico-node created daemonset.extensions/calico-node created serviceaccount/calico-node created deployment.extensions/calico-kube-controllers created serviceaccount/calico-kube-controllers created 创建完成后查看状态
[root@k8s-1 libj]# kubectl get node NAME STATUS ROLES AGE VERSION k8s-1 Ready master 133m v1.15.3 [root@k8s-1 libj]# kubectl get pods No resources found. [root@k8s-1 libj]# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system calico-kube-controllers-7b4657785d-fhxrz 0/1 ContainerCreating 0 109s kube-system calico-node-pwshp 1/1 Running 0 109s kube-system coredns-bccdc95cf-d58fh 1/1 Running 0 133m kube-system coredns-bccdc95cf-s5kzv 1/1 Running 0 133m kube-system etcd-k8s-1 1/1 Running 0 132m kube-system kube-apiserver-k8s-1 1/1 Running 0 132m kube-system kube-controller-manager-k8s-1 1/1 Running 0 132m kube-system kube-proxy-566w7 1/1 Running 0 133m kube-system kube-scheduler-k8s-1 1/1 Running 0 132m
6.添加node到集群
6.1在node节点上执行
[root@k8s-2 ~]# kubeadm join 192.168.111.51:6443 --token u5455t.tnp9bx2lkm0wgzhl \ > --discovery-token-ca-cert-hash sha256:7811481be449b5464c80532986be38a670553ce3de102ef375b7cc1fceabcac9 [preflight] Running pre-flight checks [preflight] Reading configuration from the cluster... [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml' [kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.15" ConfigMap in the kube-system namespace [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml" [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env" [kubelet-start] Activating the kubelet service [kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap... This node has joined the cluster: * Certificate signing request was sent to apiserver and a response was received. * The Kubelet was informed of the new secure connection details. Run 'kubectl get nodes' on the control-plane to see this node join the cluster. [root@k8s-2 ~]#
在master节点查看node

友情推荐:一键安装Kubernetes HA。
Kubernetes 1.15部署日记-使用kubeadm--<5-6>的更多相关文章
- Kubernetes 1.15部署日记-使用kubeadm--<7-8>
7. 在k8s集群中run一个应用 nginx已经跑起来了到此kubernetes集群部署结束了. 8. 总结 此次部署kubernetes的起因是AI团队中的kubernetes项目跑在其他IP段网 ...
- Kubernetes 1.15部署日记-使用kubeadm--<1-2-3-4>
2019年9月17日 由于此次日记篇幅较长blog限制直接使用word发布所以分成几篇来发. 1.环境准备 10.110.149.172|192.168.111.51 K8s-1 Centos7.5 ...
- Centos 使用kubeadm安装Kubernetes 1.15.3
本来没打算搞这个文章的,第一里面有瑕疵(没搞定的地方),第二在我的Ubuntu 18 Kubernetes集群的安装和部署 以及Helm的安装 也有安装,第三 和社区的问文章比较雷同 https:// ...
- kubernetes 1.15.1 高可用部署 -- 从零开始
这是一本书!!! 一本写我在容器生态圈的所学!!! 重点先知: 1. centos 7.6安装优化 2. k8s 1.15.1 高可用部署 3. 网络插件calico 4. dashboard 插件 ...
- 使用kubeadm安装Kubernetes 1.15.3 并开启 ipvs
一.安装前准备 机器列表 主机名 IP node-1(master) 1.1.1.101 node-2(node) 1.1.1.102 node-3(node) 1.1.1.103 设置时区 cp / ...
- 使用kubeadm进行单master(single master)和高可用(HA)kubernetes集群部署
kubeadm部署k8s 使用kubeadm进行k8s的部署主要分为以下几个步骤: 环境预装: 主要安装docker.kubeadm等相关工具. 集群部署: 集群部署分为single master(单 ...
- Kubeadm安装Kubernetes 1.15.1
一.实验环境准备 服务器虚拟机准备 IP CPU 内存 hostname 192.168.198.200 >=2c >=2G master 192.168.198.201 >=2c ...
- kubeadm安装Kubernetes 1.15 实践
原地址参考github 一.环境准备(在全部设备上进行) 3 台 centos7.5 服务器,网络使用 Calico. IP地址 节点角色 CPU 内存 Hostname 10.0.1.45 mast ...
- 在CentOS 7.6 以 kubeadm 安装 Kubernetes 1.15 最佳实践
前言 Kubernetes作为容器编排工具,简化容器管理,提升工作效率而颇受青睐.很多新手部署Kubernetes由于"scientifically上网"问题举步维艰,本文以实战经 ...
随机推荐
- Leetcode: Find And Replace in String
To some string S, we will perform some replacement operations that replace groups of letters with ne ...
- 使用expect快速登录线上机器
背景: 公司登陆线上服务器一般都要经过跳板机才能登陆,过程比较麻烦,如果要频繁登陆某个机器而且机器名不好记很费劲,使用expect自动登陆会方便很多 实现: 使用expect脚本自动登陆: #!/us ...
- 【转】redis报错“max number of clients reached"
查看redis监控的时候看到redis的graph出现不正常的情况,截图如下: 如上面截图所展示的样子,可以看到redis 的客户端连接数很突兀的上升到10K,又突然下降到0.排除了监控本身的原因,很 ...
- c# 并行循环支持 async
var bag = new ConcurrentBag<object>(); var tasks = myCollection.Select(async item => { // s ...
- time命令_Linux time命令:测量命令的执行时间或者系统资源的使用情况(转)
原文地址:http://m.biancheng.net/linux/time.html 这里我们要学习的 time 命令是用来测量 Linux 程序执行时间的命令,而不是用来显示系统时间的命令.不是吧 ...
- Python中解决递归限制的问题
在做某些算法时,使用递归会出现类似下面的报错: RuntimeError: maximum recursion depth exceeded python默认的递归深度是很有限的,大概是900多的样子 ...
- [LeetCode] 283. Move Zeroes 移动零
Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...
- [LeetCode] 681. Next Closest Time 下一个最近时间点
Given a time represented in the format "HH:MM", form the next closest time by reusing the ...
- 淡sqlserver对like '%关键词%' 处理时的索引利用问题
说法一:百分号%通配符前置会让SQL查询不走索引,改走全表扫描.这种说法很流行 结论是错误的 事实上这种说法不太准确 通配符%前置会让SQL查找索引时效率极速下降,但在大多数情况下还是会走索引(不需要 ...
- Mysql 学习整理
1 创建数据库 1.1数据库基本结构 数据库:数据库是表的集合,带有相关的数据. 表:一个表是多个字段的集合. 字段:一个字段是一列数据,由字段名和记录组成 1.2创建数据库 create datab ...