当前位置:网站首页>云原生DevOps环境搭建
云原生DevOps环境搭建
2022-08-01 23:12:00 【YMY_666】
Docker安装
1.移除以前docker相关包
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-engine
2.配置yum源
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
3.安装docker
sudo yum install -y docker-ce docker-ce-cli containerd.io
4.启动
systemctl enable docker --now
5.配置加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://82m9ar63.mirror.aliyuncs.com"], "exec-opts": ["native.cgroupdriver=systemd"], "log-driver": "json-file", "log-opts": { "max-size": "100m" }, "storage-driver": "overlay2" } EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
Dockerfile构建Java应用镜像
FROM openjdk:8-jdk-slim
#作者
LABEL maintainer=xxx
#复制targer目录下的jar到容器中小型linux系统里
COPY target/*jar /app.jar
#应用启动命令
ENTRYPOINT ["java","-jar","/app.jar"]
Kubernetes集群搭建
- 集群中所有机器网络彼此能互相连接
- 所有节点主机名不能重复
- 禁用交换分区
#各个机器设置自己的域名
hostnamectl set-hostname xxxx
# 将 SELinux 设置为 permissive 模式(相当于将其禁用)
sudo setenforce 0
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
#关闭swap
swapoff -a
sed -ri 's/.*swap.*/#&/' /etc/fstab
#允许 iptables 检查桥接流量
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf br_netfilter EOF
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF
sudo sysctl --system
边栏推荐
- 软技能之UML图
- PDF转Word有那么难吗?做一个文件转换器,都解决了
- 复现gallerycms字符长度限制短域名绕过
- npm npm
- Postman batch test interface detailed tutorial
- 10年稳定性保障经验总结,故障复盘要回答哪三大关键问题?|TakinTalks大咖分享
- y84.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十五)
- The monthly salary of the test post is 5-9k, how to increase the salary to 25k?
- Additional Features for Scripting
- 计算两点之间的中点
猜你喜欢
xctf attack and defense world web master advanced area webshell
The monthly salary of the test post is 5-9k, how to increase the salary to 25k?
软技能之UML图
sys_kill系统调用
xctf attack and defense world web master advanced area web2
复现gallerycms字符长度限制短域名绕过
从0到1:图文投票小程序设计与研发笔记
JS prototype hasOwnProperty in Add method Prototype end point Inherit Override parent class method
Access the selected node in the console
10年稳定性保障经验总结,故障复盘要回答哪三大关键问题?|TakinTalks大咖分享
随机推荐
程序员如何优雅地解决线上问题?
6133. 分组的最大数量
分享10套开源免费的高品质源码,免费源码下载平台
excel change cell size
SRv6 L3VPN的工作原理
From 0 to 100: Notes on the Development of Enrollment Registration Mini Programs
Additional Features for Scripting
系统可用性:SRE口中的3个9,4个9...到底是个什么东西?
How to use pywinauto and pyautogui to link the anime lady and sister please go home
Calculate the angle of a line defined by two points
cmd指令
下载安装 vscode(含汉化、插件的推荐和安装)
img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)
6133. Maximum number of packets
Getting started with IDEA is enough to read this article
添加大量元素时使用 DocumentFragments
Access the selected node in the console
What is CICD excuse me
6132. 使数组中所有元素都等于零-快速排序法
Solve the port to take up