当前位置:网站首页>Building a cloud-native DevOps environment
Building a cloud-native DevOps environment
2022-08-01 23:21: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目录下的jarsmall to mediumlinux系统里
COPY target/*jar /app.jar
#应用启动命令
ENTRYPOINT ["java","-jar","/app.jar"]
Kubernetes集群搭建
- All machine networks in the cluster can connect to each other
- All node hostnames cannot be duplicated
- 禁用交换分区
#各个机器设置自己的域名
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
边栏推荐
- img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)
- 【C补充】链表专题 - 单向链表
- Special characters & escapes in bat
- excel vertical to horizontal
- JS 数组去重(含简单数组去重、对象数组去重)
- 论文理解【RL - Exp Replay】—— Experience Replay with Likelihood-free Importance Weights
- How do programmers solve online problems gracefully?
- Chapter 12 End-User Task As Shell Scripts
- 数据库表设计规则
- excel split text into different rows
猜你喜欢
PHP算法之电话号码的字母组合
C language - branch statement and loop statement
解决yolov5训练时出现:“AssertionError: train: No labels in VOCData/dataSet_path/train.cache. Can not train ”
数据机构---第五章树与二叉树---二叉树的概念---应用题
System availability: 3 9s, 4 9s in SRE's mouth... What is it?
Solve the port to take up
[LeetCode304周赛] 两道关于基环树的题 6134. 找到离给定两个节点最近的节点,6135. 图中的最长环
美赞臣EDI 940仓库装运订单详解
C语言——分支语句和循环语句
华为无线设备配置双链路冷备份(AP指定配置方式)
随机推荐
【好书推荐】第一本无人驾驶技术书
prim生成树
2022/7/31
Always use "noopener" or "noreferrer" for links that open in a new tab
Chapter 11 Working with Dates and Times
PDF转Word有那么难吗?做一个文件转换器,都解决了
数据分析04
1391D. 505 状压dp
Getting started with IDEA is enough to read this article
How do programmers solve online problems gracefully?
程序员如何优雅地解决线上问题?
Avoid , ,
, and tags隔离和降级
chrome copies the base64 data of an image
npm包【详解】(内含npm包的开发、发布、安装、更新、搜索、卸载、查看、版本号更新规则、package.json详解等)
cmd command
SRv6 L3VPN的工作原理
颜色透明参数
华为无线设备配置双链路冷备份(AP指定配置方式)
sys_kill system call