Study From :https://www.kubernetes.org.cn/4948.html

  1. https://www.kubernetes.org.cn/4948.html

感谢原作者提供的资源

1. 安装centos7_1811_7.6

2. 升级kernel 到 4.19

3. 关闭防火墙,关闭selinux

4. 修改sysctl 内容

  1. # 设置网桥包经IPTables,core文件生成路径
  2. echo """
  3. vm.swappiness =
  4. net.bridge.bridge-nf-call-ip6tables =
  5. net.bridge.bridge-nf-call-iptables =
  6. """ > /etc/sysctl.conf
  7. sysctl -p

5. 安装ntpdate

  1. yum install -y ntpdate
  2. ntpdate -u ntp.api.bz

6. 暂时不学习集群 所以 不需要 ipvs了

7. 安装docker 17.03

最笨的办法:

然后执行安装

8. 一个虚拟机进行处理 所以不需要harbor了.

9. 将docker设置为开机启动等

10. docker load 需要的 k8s images

[来源是 原作者blog 导入到 harbor 然后自己摘出来的]

11. 安装 rpm

直接进行安装

12. 启动 kubelet

13. 关闭swap

然后 reboot

顺便修改一下 hosts 加上本机

14. 使用kubeadm 进行启动 命令为:

  1. kubeadm init --kubernetes-version=v1.13.0 --pod-network-cidr=10.244.0.0/ --ignore-preflight-errors=...

15. 命令界面为:

效果

  1. kubeadm init --kubernetes-version=v1.13.0 --pod-network-cidr=10.244.0.0/ --ignore-preflight-errors=...
  2. [init] Using Kubernetes version: v1.13.0
  3. [preflight] Running pre-flight checks
  4. [preflight] Pulling images required for setting up a Kubernetes cluster
  5. [preflight] This might take a minute or two, depending on the speed of your internet connection
  6. [preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
  7. [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
  8. [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
  9. [kubelet-start] Activating the kubelet service
  10. [certs] Using certificateDir folder "/etc/kubernetes/pki"
  11. [certs] Generating "front-proxy-ca" certificate and key
  12. [certs] Generating "front-proxy-client" certificate and key
  13. [certs] Generating "etcd/ca" certificate and key
  14. [certs] Generating "etcd/peer" certificate and key
  15. [certs] etcd/peer serving cert is signed for DNS names [centos76 localhost] and IPs [10.24.101.201 127.0.0.1 ::]
  16. [certs] Generating "etcd/healthcheck-client" certificate and key
  17. [certs] Generating "apiserver-etcd-client" certificate and key
  18. [certs] Generating "etcd/server" certificate and key
  19. [certs] etcd/server serving cert is signed for DNS names [centos76 localhost] and IPs [10.24.101.201 127.0.0.1 ::]
  20. [certs] Generating "ca" certificate and key
  21. [certs] Generating "apiserver" certificate and key
  22. [certs] apiserver serving cert is signed for DNS names [centos76 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 10.24.101.201]
  23. [certs] Generating "apiserver-kubelet-client" certificate and key
  24. [certs] Generating "sa" key and public key
  25. [kubeconfig] Using kubeconfig folder "/etc/kubernetes"
  26. [kubeconfig] Writing "admin.conf" kubeconfig file
  27. [kubeconfig] Writing "kubelet.conf" kubeconfig file
  28. [kubeconfig] Writing "controller-manager.conf" kubeconfig file
  29. [kubeconfig] Writing "scheduler.conf" kubeconfig file
  30. [control-plane] Using manifest folder "/etc/kubernetes/manifests"
  31. [control-plane] Creating static Pod manifest for "kube-apiserver"
  32. [control-plane] Creating static Pod manifest for "kube-controller-manager"
  33. [control-plane] Creating static Pod manifest for "kube-scheduler"
  34. [etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
  35. [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
  36. [apiclient] All control plane components are healthy after 25.003224 seconds
  37. [uploadconfig] storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
  38. [kubelet] Creating a ConfigMap "kubelet-config-1.13" in namespace kube-system with the configuration for the kubelets in the cluster
  39. [patchnode] Uploading the CRI Socket information "/var/run/dockershim.sock" to the Node API object "centos76" as an annotation
  40. [mark-control-plane] Marking the node centos76 as control-plane by adding the label "node-role.kubernetes.io/master=''"
  41. [mark-control-plane] Marking the node centos76 as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
  42. [bootstrap-token] Using token: 9jhx3x.c1a35jp4hq12pk7w
  43. [bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
  44. [bootstraptoken] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
  45. [bootstraptoken] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
  46. [bootstraptoken] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
  47. [bootstraptoken] creating the "cluster-info" ConfigMap in the "kube-public" namespace
  48. [addons] Applied essential addon: CoreDNS
  49. [addons] Applied essential addon: kube-proxy
  50.  
  51. Your Kubernetes master has initialized successfully!
  52.  
  53. To start using your cluster, you need to run the following as a regular user:
  54.  
  55. mkdir -p $HOME/.kube
  56. sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  57. sudo chown $(id -u):$(id -g) $HOME/.kube/config
  58.  
  59. You should now deploy a pod network to the cluster.
  60. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  61. https://kubernetes.io/docs/concepts/cluster-administration/addons/
  62.  
  63. You can now join any number of machines by running the following on each node
  64. as root:
  65.  
  66. kubeadm join 10.24.101.201: --token 9jhx3x.c1a35jp4hq12pk7w --discovery-token-ca-cert-hash sha256:5f02ab9b825cf6c21f46a5701c4391e6e1c8c584219a458b3e91f1163bf3a402

效果:

需要安装 flannel 或者是calico 才可以.

这里先不写了....

感谢原作者

kubeadm 跟之前的版本 基本上一致的 简单测试了下.

使用kubeadm 离线安装 单master k8s 1.13的更多相关文章

  1. 企业运维实践-还不会部署高可用的kubernetes集群?使用kubeadm方式安装高可用k8s集群v1.23.7

    关注「WeiyiGeek」公众号 设为「特别关注」每天带你玩转网络安全运维.应用开发.物联网IOT学习! 希望各位看友[关注.点赞.评论.收藏.投币],助力每一个梦想. 文章目录: 0x00 前言简述 ...

  2. kubernetes实战(二十五):kubeadm 安装 高可用 k8s v1.13.x

    1.系统环境 使用kubeadm安装高可用k8s v.13.x较为简单,相比以往的版本省去了很多步骤. kubeadm安装高可用k8s v.11 和 v1.12 点我 主机信息 主机名 IP地址 说明 ...

  3. ubunut下使用kubeadm离线安装k8s1.9

    模仿转载的那个博客,简单记录下过程. 需要的文件. 原贴里面的:http://www.bladewan.com/2018/01/02/kubernetes_install/ 镜像文件,以及单独下载一些 ...

  4. kubeadm安装K8S单master双节点集群

    宿主机:master:172.16.40.97node1:172.16.40.98node2:172.16.40.99 # 一.k8s初始化环境:(三台宿主机) 关闭防火墙和selinux syste ...

  5. 使用Kubeadm安装Kubernetes【单Master节点】

    参考:Kubernetes官方文档 Kubernetes安装方案选择    Centos 7 配置科学上网 安装Calico网络插件 kubernetes-dashboard部署 Kubernetes ...

  6. 【K8S】基于单Master节点安装K8S集群

    写在前面 最近在研究K8S,今天就输出部分研究成果吧,后续也会持续更新. 集群规划 IP 主机名 节点 操作系统版本 192.168.175.101 binghe101 Master CentOS 8 ...

  7. centos7.3 kubernetes/k8s 1.10 离线安装 --已验证

    本文介绍在centos7.3使用kubeadm快速离线安装kubernetes 1.10. 采用单master,单node(可以多node),占用资源较少,方便在笔记本或学习环境快速部署,不适用于生产 ...

  8. k8s 组件介绍__单Master集群部署

    参考链接:https://github.com/opsnull/follow-me-install-kubernetes-cluster kubernetes 概述 1.kubernetes 是什么 ...

  9. 从零到一,利用kubeadm在ubuntu server 16.04 64位系统离线安装kubernetes v1.10.0

    说明 初步接触kubernets,记录学习过程 本教程目的利用kubeadm在ubuntu server 16.04 64位系统离线安装kubernets v1.10.0 环境信息 节点IP地址 角色 ...

随机推荐

  1. 运行metamascara时出现的一些错误

    The difference between mascara and the extension Mascara Is in alpha and some of it's behaviors are ...

  2. redis cluster应用连接(password)

    application.properties 集群配置 application.properties #各Redis节点信息spring.redis.cluster.nodes=47.96.*.*:6 ...

  3. 理解JavaScript中的作用域链

    理解了作用域链,闭包就不难理解了,所以本文主要谈一谈我对作用域链的理解.   关于JavaScript中变量的作用域,全局变量在程序中始终都有定义.局部变量在声明它的函数体内以及其内部所嵌套的函数内始 ...

  4. Convolutional Networks for Images,Speech,and Time-series

    Convolutional Networks for Images,Speech,and Time-series Yann LeCun  Yoshua Bengio 1995年的 1引言 多层BP网络 ...

  5. 微信小程序开发 [04] 模板和模块化

    1.模板 如果相同的wxml代码可能在不同的页面重复使用,ctrl+c配合ctrl+v的方式,后期维护起来未免也太麻烦了.微信提供了"模板",可以在模板中定义代码片段,然后在不同的 ...

  6. 数字IC设计入门书单

    首发于观芯志 写文章     数字IC设计入门书单 Forever snow   1 年前 作者:Forever snow链接:你所在领域的入门书单? - 知乎用户的回答来源:知乎著作权归作者所有,转 ...

  7. gdb中信号

    信号(Signals) 信号是一种软中断,是一种处理异步事件的方法.一般来说,操作系统都支持许多信号.尤其是UNIX,比较重要应用程序一般都会处理信号.UNIX定义了许 多信号,比如SIGINT表示中 ...

  8. 牛掰本机限速软件appband

    带宽调度器AppBand可以为Windows应用程序分配网络带宽并指定数据收发的优先级,用软件的方式实现桌面应用的简单QOS调度.(1) P2P方式的下载软件(BT/eMule/迅雷等)或者在线播放占 ...

  9. vb6/ASP FORMAT MM/DD/YYYY

    VB6或者ASP 格式化时间为 MM/dd/yyyy 格式,竟然没有好的办法, Format 或者FormatDateTime 竟然结果和系统设置的区域语言的日期和时间格式相关.意思是尽管你用诸如 F ...

  10. JavaEE笔记(十一)

    Spring beans使用参数占位符(JDBC配置读取示例) beans.xml配置文件 <?xml version="1.0" encoding="UTF-8& ...