K8S 1.9.0二进制包部署(三)

4、k8s node
#############kubelet

cp kubelet /usr/bin/
chmod 755 /usr/bin/kubelet
mkdir -p /app/kubernetes/data
mkdir -p /app/kubernetes/conf
mkdir -p /app/kubernetes/log

vi /usr/lib/systemd/system/kubelet.service
[Unit]
Description=Kubernetes Kubelet Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=docker.service
Requires=docker.service
[Service]
WorkingDirectory=/app/kubernetes/data
EnvironmentFile=/app/kubernetes/conf/kubelet
ExecStart=/usr/bin/kubelet $KUBELET_ARGS
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target

vi /app/kubernetes/conf/kubelet
KUBELET_ARGS="--kubeconfig=/app/kubernetes/conf/kubelet.kubeconfig --fail-swap-on=false --hostname-override=192.168.254.54 --pod-infra-container-image=mirrorgooglecontainers/pause-amd64:3.0 --logtostderr=false --log-dir=/app/kubernetes/log --v=2"
hostname-override=参数是指定名字,如果不写此参数默认是主机hostname名。
--pod-infra-container-image= 改写一个可下载镜像的地址,此image如果pull不了会导致分发无法创建pod
kubeconfig配置文件参考http://www.jianshu.com/p/41e55f4d0cb8

vi /app/kubernetes/conf/kubelet.kubeconfig
apiVersion: v1
kind: Config
clusters:

  • cluster:
    server: http://192.168.254.53:8080 #此处输入集群master地址
    name: local
    contexts:
  • context:
    cluster: local
    name: local
    current-context: local

systemctl daemon-reload
systemctl enable kubelet.service
systemctl start kubelet.service
systemctl status kubelet.service

#############kube-proxy

cp kube-proxy /usr/bin/
chmod 755 /usr/bin/kube-proxy

vi /usr/lib/systemd/system/kube-proxy.service
[Unit]
Description=Kubernetes Kube-Proxy Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=network.target
Requires=network.service
[Service]
EnvironmentFile=/app/kubernetes/conf/proxy
ExecStart=/usr/bin/kube-proxy $KUBE_PROXY_ARGS
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target

vi /app/kubernetes/conf/proxy
KUBE_PROXY_ARGS="--master=http://192.168.254.53:8080 --logtostderr=false --log-dir=/app/kubernetes/log --v=2"#此处输入集群master地址

systemctl daemon-reload
systemctl enable kube-proxy.service
systemctl start kube-proxy.service
systemctl status kube-proxy.service

原文地址:http://blog.51cto.com/285534/2068962

时间: 2024-10-11 05:54:09

K8S 1.9.0二进制包部署(三)的相关文章

K8S 1.9.0二进制包部署(四)

5.flannel cp flanneld /usr/bin/chmod 755 /usr/bin/flanneldmkdir -p /app/flannel/conf/ vi /usr/lib/systemd/system/flanneld.service[Unit]Description=flanneld overlay address etcd agentAfter=network.targetBefore=docker.service[Service]Type=notifyEnviron

K8S 1.9.0二进制包部署(五)

6.dashboard v1.8.0在kubernetes目录下有src的压缩包,解压后在cluster/addons/dashboard 下有5个文件dashboard-controller.yaml dashboard-service.yaml dashboard-secret.yaml dashboard-rbac.yaml dashboard-configmap.yaml vim dashboard-controller.yaml修改红色部分添加 - --apiserver-host=h

k8s1.13.0二进制部署-master节点(三)

部署apiserver 创建生成CSR的JSON配置文件 [[email protected] ssl]# vim kubernetes-csr.json { "CN": "kubernetes", "hosts": [ "127.0.0.1", "192.168.0.123", "192.168.0.124", "192.168.0.130", "10.0

Kubernetes 集群部署 ——二进制包

ETCD 二进制包地址:请添加链接描述 第一步:部署 master 先准备好两个脚本文件: 1.vim etcd-cert.sh ##定义ca证书: cat > ca-config.json <<EOF { "signing": { "default": { "expiry": "87600h" }, "profiles": { "www": { "expir

Centos7.5安装mysql5.7.24二进制包方式部署(keepalived+主从复制)

一.环境准备: 操作系统:CentOS Linux release 7.5.1804 (Core) mysql版本:mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz主库:172.16.8.247从库:172.16.8.249主机名:172.16.8.247 qas-zabbix-node01172.16.8.249 qas-zabbix-node02172.16.8.248 vip 二.mysql5.7安装及主从复制配置 主库:172.16.8.247从库:1

Centos7.5安装mysql5.7.24二进制包方式部署(主从复制)

一.环境准备: 操作系统:CentOS Linux release 7.5.1804 (Core) mysql版本:mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz主库:172.16.8.247从库:172.16.8.249主机名:172.16.8.247 qas-zabbix-node01172.16.8.249 qas-zabbix-node02 二.mysql5.7安装 主库:172.16.8.247从库:172.16.8.249数据安装参考:一.Cen

k8s实践19:kubernetes二进制部署集群v1.12升级v1.15

1.升级前的版本 [[email protected] ~]# kubectl version Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.4", GitCommit:"5ca598b4ba5abb89bb773071ce452e33fb66339d", GitTreeState:"clean", BuildDa

二进制方式部署kubernetes 1.16.0

环境 操作系统:CentOS Linux release 7.7.1908 (Core) Kernel version:3.10.0-1062.1.1.el7.x86_64 工作系统:win10 on Ubuntu 19.04 ETCD 部署IP: 192.168.30.50 ETCD 版本: v3.4.1 kube-apiserver,kube-scheduler,kube-controller-manager 部署IP: 192.168.30.52 kubelet部署IP:192.168.3

Nginx部署文档(二进制包安装)

Nginx部署文档(二进制包安装) 创建时间:2016-06-27 修改时间:2017-03-04 修改时间:2017-03-06 文档目的2 基础知识2 常用命令2 系统环境2 操作步骤3 1. 安装依赖3 2. 安装nginx3 3. 启动nginx5 3. 关闭防火墙6 4. 修改生产环境配置6 常见问题7 问题一:报错"cp: `conf/koi-win' and `/usr/local/nginx/conf/koi-win' are the same file"7 问题二:[