当前位置:网站首页>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
边栏推荐
- Chapter 19 Tips and Traps: Common Goofs for Novices
- 华为无线设备配置全局双链路冷备份(AC全局配置方式)
- Chapter 12 End-User Task As Shell Scripts
- Access the selected node in the console
- Chapter 12 End-User Task As Shell Scripts
- 从0到100:招生报名小程序开发笔记
- CAKE:一个用于多视图知识图谱补全的可扩展性常识感知框架
- Error creating bean with name ‘dataSource‘:Unsatisfied dependency expressed through field ‘basicPro
- A. Doremy‘s IQ-- Codeforces Round #808 (Div. 1)
- 【好书推荐】第一本无人驾驶技术书
猜你喜欢
随机推荐
Codeforces CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) A-D Solution
检查点是否在矩形内
怎样做才能让这条SQL变成一条危险的SQL?
【数据分析03】
npm包【详解】(内含npm包的开发、发布、安装、更新、搜索、卸载、查看、版本号更新规则、package.json详解等)
The monthly salary of the test post is 5-9k, how to increase the salary to 25k?
数据机构---第五章树与二叉树---二叉树的概念---应用题
华为无线设备配置双链路冷备份(AP指定配置方式)
excel remove all carriage return from a cell
简单3D渲染器的制作
毫秒级!千万人脸库快速比对,上亿商品图片检索,背后的极速检索用了什么神器?
Chapter 11 Working with Dates and Times
When using DocumentFragments add a large number of elements
美赞臣EDI 940仓库装运订单详解
Chapter 12 End-User Task As Shell Scripts
Thesis understanding [RL - Exp Replay] - Experience Replay with Likelihood-free Importance Weights
bat 之 特殊字符&转义
浅析多服务在分布式系统下多事务通信处理机制方案
6132. All the elements in the array is equal to zero - quick sort method
cmd command









