• centos7 --kubeadm安装


    One or more machines running one of:
    Ubuntu 16.04+
    Debian 9
    CentOS 7
    RHEL 7
    Fedora 25/26 (best-effort)
    HypriotOS v1.0.1+
    Container Linux (tested with 1800.6.0)
    内存:2 GB or more of RAM per machine (any less will leave little room for your apps)
    cpu:2 CPUs or more
    网络:Full network connectivity between all machines in the cluster (public or private network is fine)
    独立:Unique hostname, MAC address, and product_uuid for every node. ip link or ifconfig -a ,cat /sys/class/dmi/id/product_uuid
    端口开放:Certain ports are open on your machines. See here for more details.
    swap:Swap disabled. You MUST disable swap in order for the kubelet to work properly

    一、基础配置

    #添加google repo源,要翻墙。
    cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg exclude=kube* EOF #关闭selinux setenforce 0 sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config systemctl enable --now kubelet

    二、安装kubelt  kubeadm kubectl

    yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

    三、启动

    systemctl enable --now kubelet

    其他

    #如果防火墙启动的话,可能需要开启下面:
    cat <<EOF > /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF sysctl --system
  • 相关阅读:
    java 线程之间的协作 wait()与notifyAll()
    加密web.config中的邮件配置mailSettings
    TCP编程,Socket通讯
    jQuery插件学习笔记
    抹掉Scala的糖衣(14) -- Update Method
    UVA 12034 Race (递推神马的)
    struts2 命名空间 namespace 学习
    Vim -&gt; 移动光标
    【跟我一步一步学Struts2】——Struts2工作流程
    Python中sort以及sorted函数初探
  • 原文地址:https://www.cnblogs.com/kevincaptain/p/10454817.html
Copyright © 2020-2023  润新知