博主信息
博文 291
粉丝 0
评论 0
访问量 459975
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
使用阿里巴巴开源镜像站镜像——Kubernetes 镜像
原创
749人浏览过

镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

Kubernetes 镜像简介

Kubernetes 是一个开源系统,用于容器化应用的自动部署、扩缩和管理。它将构成应用的容器按逻辑单位进行分组以便于管理和发现。

下载地址:https://mirrors.aliyun.com/kubernetes/

Kubernetes 镜像配置方法

基于CentOS / RHEL / Fedora系统配置方法

(1)查看系统版本信息

  1. [root@centos ~]# hostnamectl
  2. Static hostname: centos
  3. Icon name: computer-vm
  4. Chassis: vm
  5. Machine ID: f6fc8fb7991c4c518238af7c75f16046
  6. Boot ID: baa5dae1c7614a0790ac9c3b5c0a9b7b
  7. Virtualization: vmware
  8. Operating System: CentOS Linux 7 (Core)
  9. CPE OS Name: cpe:/o:centos:centos:7
  10. Kernel: Linux 3.10.0-1160.el7.x86_64
  11. Architecture: x86-64

(2)添加并查看 Kubernetes.repo YUM源

  1. [root@centos ~]# cat <<EOF > /etc/yum.repos.d/kubernetes.repo
  2. > [kubernetes]
  3. > name=Kubernetes
  4. > baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
  5. > enabled=1
  6. > gpgcheck=1
  7. > repo_gpgcheck=1
  8. > gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
  9. > EOF
  10. [root@centos ~]# cat /etc/yum.repos.d/kubernetes.repo
  11. [kubernetes]
  12. name=Kubernetes
  13. baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
  14. enabled=1
  15. gpgcheck=1
  16. repo_gpgcheck=1
  17. gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
  18. [root@centos ~]#

PS:由于官网未开放同步方式, 可能会有索引gpg检查失败的情况, 这时请用 yum install -y --nogpgcheck kubelet kubeadm kubectl 安装

(3)关闭或允许SELINUX安全模式

执行setenforce 0命令,暂时允许SELINUX安全模式放行通过。重启失效。

  1. [root@centos ~]# setenforce 0
  2. [root@centos ~]# getenforce
  3. permissive

编辑/etc/selinux/config配置文件,保存退出,重启生效。

  1. [root@centos ~]# vim /etc/selinux/config
  2. [root@centos ~]# cat /etc/selinux/config
  3. # This file controls the state of SELinux on the system.
  4. # SELINUX= can take one of these three values:
  5. # enforcing - SELinux security policy is enforced.
  6. # permissive - SELinux prints warnings instead of enforcing.
  7. # disabled - No SELinux policy is loaded.
  8. SELINUX=disabled
  9. # SELINUXTYPE= can take one of three values:
  10. # targeted - Targeted processes are protected,
  11. # minimum - Modification of targeted policy. Only selected processes are protected.
  12. # mls - Multi Level Security protection.
  13. SELINUXTYPE=targeted
  14. [root@centos ~]# getenforce
  15. Disabled

(4)安装kubernetes

  1. [root@centos ~]# yum install -y kubelet kubeadm kubectl
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * extras: mirrors.aliyun.com
  6. * updates: mirrors.aliyun.com
  7. Package kubelet-1.22.4-0.x86_64 already installed and latest version
  8. Package kubeadm-1.22.4-0.x86_64 already installed and latest version
  9. Package kubectl-1.22.4-0.x86_64 already installed and latest version
  10. Nothing to do
  11. [root@centos ~]#

file

(5)启动kubernetes

  1. [root@centos ~]# systemctl start kubelet
  2. [root@centos ~]# systemctl enable kubelet
  3. Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.

本文转自:xuyebao

本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学