使用阿里巴巴开源镜像站镜像——Kubernetes 镜像
2024-08-30 06:02:25
镜像下载、域名解析、时间同步请点击 阿里云开源镜像站
Kubernetes 镜像简介
Kubernetes 是一个开源系统,用于容器化应用的自动部署、扩缩和管理。它将构成应用的容器按逻辑单位进行分组以便于管理和发现。
下载地址:https://mirrors.aliyun.com/kubernetes/
Kubernetes 镜像配置方法
基于CentOS / RHEL / Fedora系统配置方法
(1)查看系统版本信息
[root@centos ~]# hostnamectl
Static hostname: centos
Icon name: computer-vm
Chassis: vm
Machine ID: f6fc8fb7991c4c518238af7c75f16046
Boot ID: baa5dae1c7614a0790ac9c3b5c0a9b7b
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.el7.x86_64
Architecture: x86-64
(2)添加并查看 Kubernetes.repo
YUM源
[root@centos ~]# cat <<EOF > /etc/yum.repos.d/kubernetes.repo
> [kubernetes]
> name=Kubernetes
> baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
> enabled=1
> gpgcheck=1
> repo_gpgcheck=1
> gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
> EOF
[root@centos ~]# cat /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
[root@centos ~]#
PS:由于官网未开放同步方式, 可能会有索引gpg检查失败的情况, 这时请用
yum install -y --nogpgcheck kubelet kubeadm kubectl
安装
(3)关闭或允许SELINUX安全模式
① 执行setenforce 0
命令,暂时允许SELINUX安全模式放行通过。重启失效。
[root@centos ~]# setenforce 0
[root@centos ~]# getenforce
permissive
② 编辑/etc/selinux/config
配置文件,保存退出,重启生效。
[root@centos ~]# vim /etc/selinux/config
[root@centos ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@centos ~]# getenforce
Disabled
(4)安装kubernetes
[root@centos ~]# yum install -y kubelet kubeadm kubectl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Package kubelet-1.22.4-0.x86_64 already installed and latest version
Package kubeadm-1.22.4-0.x86_64 already installed and latest version
Package kubectl-1.22.4-0.x86_64 already installed and latest version
Nothing to do
[root@centos ~]#
(5)启动kubernetes
[root@centos ~]# systemctl start kubelet
[root@centos ~]# systemctl enable kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
本文转自:xuyebao
最新文章
- java读取文件之txt文本
- ASP.NET多线程下使用HttpContext.Current为null解决方案 2015-01-22 15:23 350人阅读 评论(0) 收藏
- IOS之UI -- 按钮UIButton的细节
- Hadoop学习(1)-- 入门介绍
- Linux计划任务Crontab实例详解教程
- addcontentView之后如何让这个view消失掉
- Heap和Heapify
- POJ 2376 Cleaning Shifts 贪心
- unity UGUI动态字体显示模糊
- vs 2013下自定义ASP.net MVC 5/Web API 2 模板(T4 视图模板/控制器模板)
- poj 2126 Factoring a Polynomial 数学多项式分解
- JS - 侧边导航收缩伸展
- axis-运行bat报错问题
- 用Zephir编写PHP扩展
- 分而治之(Work Breakdown Structure, WBS)
- Servlet 笔记-servlet实例
- Visio如何调整锁定图像大小
- Python 入门:基本语法
- 有多个正整数存放在数组中,编写一个函数要求偶数在左边由小到大顺序放置,奇数在右边,也是由小到大顺序放置,Java实现
- python框架之Django(8)-CBV中添加装饰器
热门文章
- spring5+Struts2+hibernate5
- 最好的Java开发工具---IDEA
- Spring系列12: `@Value` `@Resource` `@PostConstruct` `@PreDestroy` 详解
- Java多态、向上转型、向下转型知识分享(讲解全面)
- 从服务间的一次调用分析整个springcloud的调用过程(一)
- 基于 Kintex-7 XC7K325T的半高PCIe x4双路万兆光纤收发卡
- Spring Cloud之微服务注册到Eureka Server集群后访问改造
- Vulhub-漏洞环境的搭建(详细版)
- DoS,DDoS,DRoS攻击
- 号称BI商业智能界的“四大天王”