当前位置:网站首页>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
边栏推荐
- 对于在新标签页中打开的链接,始终使用“noopener”或“noreferrer”
- excel edit a cell without double clicking
- 复现gallerycms字符长度限制短域名绕过
- excel split text into different rows
- Calculate the midpoint between two points
- 6132. 使数组中所有元素都等于零-快速排序法
- 加载字体时避免隐藏文本
- excel remove all carriage return from a cell
- Calculate the angle of a line defined by two points
- When solving yolov5 training: "AssertionError: train: No labels in VOCData/dataSet_path/train.cache. Can not train"
猜你喜欢
From 0 to 100: Notes on the Development of Enrollment Registration Mini Programs
Thesis understanding [RL - Exp Replay] - Experience Replay with Likelihood-free Importance Weights
还在纠结报表工具的选型么?来看看这个
[LeetCode304周赛] 两道关于基环树的题 6134. 找到离给定两个节点最近的节点,6135. 图中的最长环
C#大型互联网平台管理框架源码:基于ASP.NET MVC+EF6+Bootstrap开发,支持多数据库
下载安装 vscode(含汉化、插件的推荐和安装)
华为无线设备配置双链路冷备份(AP指定配置方式)
chrome复制一张图片的base64数据
仿牛客网项目第三章:开发社区核心功能(详细步骤和思路)
E - Integer Sequence Fair
随机推荐
隔离和降级
excel edit a cell without double clicking
数据分析04
cmd指令
excel split text into different rows
颜色透明参数
A. Doremy‘s IQ-- Codeforces Round #808 (Div. 1)
下载安装 vscode(含汉化、插件的推荐和安装)
CF1703G Good Key, Bad Key
【C语言进阶】文件操作(二)
PHP算法之最接近的三数之和
云原生DevOps环境搭建
Codeforces CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) A-D 题解
npm npm
牛客多校4 A.Task Computing 思维
The monthly salary of the test post is 5-9k, how to increase the salary to 25k?
excel edit a cell without double clicking
excel remove all carriage return from a cell
简单3D渲染器的制作
IDEA入门看这一篇就够了