Kuberneteser二进制安装与配置(二)
wget https://github.com/kubernetes/kubernetes/releases/download/v1.11.4/kubernetes.tar.gz
tar -zxvf kubernetes.tar.gz
cd kubernetes
sh cluster/get-kube-binaries.sh
yum -y install firewalld
systemctl stop firewalld
systemctl disable firewalld.service
wget https://github.com/coreos/etcd/releases/download/v3.3.2/etcd-v3.3.2-linux-amd64.tar.gz
tar -zxvf cd etcd-v3.3.2-linux-amd64/tar.gz
cd etcd-v3.3.2-linux-amd64/
cp etcd etcdctl /usr/bin/
[Unit]
Description=Etcd Server
After=network.target [Service]
Type=simple
WorkingDirectory=/var/lib/etcd/
EnvironmentFile=-/etc/etcd/etcd.conf
ExecStart=/usr/bin/etcd [Install]
WantedBy=multi-user.target
mkdir /var/lib/etcd
systemctl daemon-reload
systemctl start etcd.service
etcdctl cluster-health
[Unit]
Description=Kubernetes API Server
After=etcd.service
Wants=etcd.service [Service]
EnvironmentFile=/etc/kubernetes/apiserver
ExecStart=/usr/bin/kube-apiserver \
$KUBE_LOGTOSTDERR \
$KUBE_ETCD_SERVERS \
$KUBE_LOG_LEVEL \
$KUBE_LOG_DIR \
$KUBE_API_ADDRESS \
$KUBE_API_PORT \
$KUBE_SERVICE_ADDRESS \
$KUBE_SERVICE_PORT \
$KUBE_ADMISSION_CONTROL
Restart=on-failure
Type=notify
LimitNOFILE= [Install]
WantedBy=multi-user.target
KUBE_ETCD_SERVERS="--etcd-servers=http://127.0.0.1:2379"
KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0"
KUBE_API_PORT="--insecure-port=8080"
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=169.169.0.0/16"
KUBE_SERVICE_PORT="--service-node-port-range=1-65535"
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ResourceQuota"
KUBE_LOGTOSTDERR="--logtostderr=false"
KUBE_LOG_DIR="--log-dir=/var/log/kubernetes"
KUBE_LOG_LEVEL="--v=2"
cp kube-apiserver /usr/bin/
systemctl daemon-reload
systemctl start kube-apiserver.service
systemctl status kube-apiserver.service
[Unit]
Description=Kubernetes Controller Manager Server
After=kube-apiserver.service
Requires=kube-apiserver.service [Service]
EnvironmentFile=/etc/kubernetes/controller-manager
ExecStart=/usr/bin/kube-controller-manager \
$KUBE_LOGTOSTDERR \
$KUBE_LOGDIR \
$KUBE_LOG_LEVEL \
$KUBE_MASTER
Restart=on-failure
LimitNOFILE= [Install]
WantedBy=multi-user.target
KUBE_MASTER="--master=http://127.0.0.1:8080"
KUBE_LOGTOSTDERR="--logtostderr=false"
KUBE_LOGDIR="--log-dir=/var/log/kubenetes"
KUBE_LOG_LEVEL="--v=2"
cp kube-controller-manager /usr/bin/
systemctl start kube-controller-manager.service
systemctl status kube-controller-manager.service
[Unit]
Description=Kubernetes Schedule Server
After=kube-apiserver.service
Requires=kube-apiserver.service [Service]
EnvironmentFile=/etc/kubernetes/schedule
ExecStart=/usr/bin/kube-scheduler \
$KUBE_LOGTOSTDERR \
$KUBE_LOGDIR \
$KUBE_LOG_LEVEL \
$KUBE_MASTER Restart=on-failure
LimitNOFILE= [Install]
WantedBy=multi-user.target
KUBE_MASTER="--master=http://127.0.0.1:8080"
KUBE_LOGTOSTDERR="--logtostderr=false"
KUBE_LOGDIR="--log-dir=/var/log/kubenetes"
KUBE_LOG_LEVEL="--v=2"
cp kube-scheduler /usr/bin/
systemctl daemon-reload
systemctl start kube-schedule.service
systemctl status kube-schedule.service
yum -y remove docker*
yum -y install docker
systemctl start docker
[Unit]
Description=Kubernetes Kubelete Server
After=docker.service
Requires=docker.service [Service]
WorkingDirectory=/var/lib/kubelet
EnvironmentFile=/etc/kubernetes/kubelet
ExecStart=/usr/bin/kubelet \
$KUBELET_ADDRESS \
$KUBELET_POD_INFRA_CONTAINER \
$KUBELET_ARGS \
$KUBE_LOGTOSTDERR \
$KUBE_LOGDIR \
$KUBE_LOG_LEVEL \
$KUBE_CGROUPS \
$KUBE_HOSTNAME Restart=on-failure [Install]
WantedBy=multi-user.target
KUBELET_ADDRESS="--address=0.0.0.0"
KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure"
KUBELET_ARGS="--enable-server=true --enable-debugging-handlers=true --fail-swap-on=false --kubeconfig=/etc/kubernetes/config"
KUBE_LOGTOSTDERR="--logtostderr=false"
KUBE_LOGDIR="--log-dir=/var/log/kubenetes"
KUBE_LOG_LEVEL="--v=2"
KUBE_CGROUPS="--runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice"
KUBE_HOSTNAME="--hostname-override=node1"
apiVersion: v1
kind: Config
users:
- name: kubelet
clusters:
- name: kubernetes
cluster:
server: http://172.29.1.165:8080
contexts:
- context:
cluster: kubernetes
user: kubelet
name: service-account-context
current-context: service-account-context
mkdir /var/lib/kubelet
cp kubelet /usr/bin/
systemctl daemon-reload
systemctl start kubelet.service
systemctl status kubelet.service
这里启动kubelet可能会报错:
failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "cgroupfs" is different from docker cgroup driver: "systemd"
--exec-opt native.cgroupdriver=systemd 修改成 --exec-opt native.cgroupdriver=cgroupfs
[Unit]
Description=Kubernetes Kubelete Server
After=network.service
Requires=network.service [Service]
EnvironmentFile=/etc/kubernetes/proxy
ExecStart=/usr/bin/kube-proxy \
$KUBE_LOGTOSTDERR \
$KUBE_LOGDIR \
$KUBE_LOG_LEVEL \
$KUBE_MASTER
Restart=on-failure
LimitNOFILE= [Install]
WantedBy=multi-user.target
KUBE_MASTER="--master=http://172.29.1.165:8080"
KUBE_LOGTOSTDERR="--logtostderr=false"
KUBE_LOGDIR="--log-dir=/var/log/kubenetes"
KUBE_LOG_LEVEL="--v=2"
cp kube-proxy /usr/bin/
systemctl daemon-reload
systemctl start kube-proxy.service
systemctl status kube-proxy.service
cp kubectl /usr/bin/
kubectl get cs
kubectl get nodes
Kuberneteser二进制安装与配置(二)的更多相关文章
- zabbix系列之六——安装后配置二Items
https://www.zabbix.com/documentation/3.4/manual/config/items/itemtypes/snmp 1Items 1.1creating items ...
- mysql5.7 for windows二进制安装及配置
1)mysql5.7二进制软件下载 下载地址:https://dev.mysql.com/downloads/mysql/5.7.html#downloads 下载软件:mysql-5.7.25-wi ...
- zabbix系列之七——安装后配置二Userparameters
1User parameters(用户自定义参数) 1.1配置 描述 详细 备注 简介 1执行zabbix中未预定义的agent check时使用 配置 1) zabbix agent的配置文件 ...
- 二进制安装kubernetes(二) kube-apiserver组件安装
根据架构图,我们的apiserver部署在hdss7-21和hdss7-22上: 首先在hdss7-200上申请证书并拷贝到21和22上: 创建证书文件: # cd /opt/certs # vi c ...
- 试用vSphere 6(三):安装vCenter 6(独立数据库)之:vCenter安装与配置
------------------------------------------ 一.VMware vSphere 6(RC版)安装配置系列文章: 1.试用vSphere 6(一):安装ESXi ...
- MySQL服务器的安装和配置,MySQL Workbench 8.0.12安装,MySQL的基本使用
一 MySQL服务器的安装和配置 二 MySQL Workbench 8.0.12安装 三 MySQL的基本使用 一MySQL服务器的安装和配置 MySQL是目前最为流行的开放源码的数据库,是完全网络 ...
- 持续集成(CI)工具------Hudson/Jenkins(Continuous Integration)安装与配置具体解释
本文同意转载.但请标明出处:http://blog.csdn.net/wanghantong/article/40985653/, 版权全部 文章概述: 一. 描写叙述了持续集成工具Hudson的安装 ...
- 13. 第十二篇 二进制安装kubelet
文章转载自:https://mp.weixin.qq.com/s?__biz=MzI1MDgwNzQ1MQ==&mid=2247483842&idx=1&sn=1ef1cb06 ...
- OpenStack云计算快速入门之二:OpenStack安装与配置
原文:http://blog.chinaunix.net/uid-22414998-id-3265685.html OpenStack云计算----快速入门(2) 该教程基于Ubuntu12.04版, ...
随机推荐
- java基础知识—抽象和封装
1.从现实中抽象出类的步骤: 1)找出它的种类--类名 2)找出它的属性--字段的名称 3)找出它的行为--方法名 2.抽象的原则:根据面向对象的思想抽象出类. 3.类图的好处:直观.容易理解. 4. ...
- 目标检测(一) R-CNN
R-CNN全称为 Region-CNN,它是第一个成功地将深度学习应用到目标检测的算法,后续的改进算法 Fast R-CNN.Faster R-CNN都是基于该算法. 传统方法 VS R-CNN 传统 ...
- Web开发常见的几个漏洞解决方法 (转)
基本上,参加的安全测试(渗透测试)的网站,可能或多或少存在下面几个漏洞:SQL注入漏洞.跨站脚本攻击漏洞.登陆后台管理页面.IIS短文件/文件夹漏洞.系统敏感信息泄露. 1.测试的步骤及内容 这些安全 ...
- day13 内置函数一
见如下网址 https://www.processon.com/mindmap/5bdc3f49e4b0844e0bc6b5d3
- 2018-2019-2 《网络对抗技术》Exp5 MSF基础应用 20165326
Exp5 MSF基础应用 实践内容 主动攻击实践 ms17_010_enternalblue 靶机:win7 x64成功 针对浏览器的攻击 ms14_064_ole_code_execution 靶机 ...
- Java ee Turorial Hello1 Hello1.java解析
package javaeetutorial.hello1; import javax.enterprise.context.RequestScoped;import javax.inject.Nam ...
- 入门项目 A6 lib common 登陆状态装饰
# 用户认证装饰器 def auth(func): from core import src def inner(*args, **kwargs): # 调用被装饰函数前需要做的操作 if src.u ...
- linux 入门学习
一.命令 1.命令提示符 [root@localhost ~]# [] :提示符的分隔符,无特殊含义: root:当前的登录用户: @:分隔符,无特殊含义: localhost:当前主机名(完整名称: ...
- 在PL/SQL中调用Oracle存储过程
存储过程 1 什么是存储过程? 用于在数据库中完成特定的操作或者任务.是一个PLSQL程序块,可以永久的保存在数据库中以供其他程序调用. 2 存储过程的参数模式 存储过程的参数特性: IN类型的参数 ...
- word2vec 注意事项
Hierarchical Softmax是一种对输出层进行优化的策略,输出层从原始模型的利用softmax计算概率值改为了利用Huffman树计算概率值.一开始我们可以用以词表中的全部词作为叶子节点, ...