11 自由风格发布项目到k8s

一 背景说明

新版的jenkins由于一些k8s插件发现没了,没法使用之前的方法发布了,这次不使用任何插件,直接使用自由风格发布。jenkins是使用docker启动的,k8s环境是基于 1.23版本

二 docker运行jenkins

2.1 安装docker和docker-compase

2.1.1 安装docker环境-ubuntu系统

安装方法
https://www.runoob.com/docker/ubuntu-docker-install.html
自动安装
 curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
手动安装
安装 apt 依赖包,用于通过HTTPS来获取仓库:
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
    
添加 Docker 的官方 GPG 密钥:
 curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
 
 sudo apt-get install docker-ce docker-ce-cli containerd.io

2.1.2 安装docker环境-centos系统

安装方式
https://www.runoob.com/docker/centos-docker-install.html
#手动安装
安装所需的软件包。yum-utils 提供了 yum-config-manager ,并且 device mapper 存储驱动程序需要 device-mapper-persistent-data 和 lvm2
yum install -y yum-utils device-mapper-persistent-data lvm2
#设置指定仓库

yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
#阿里云仓库
sudo yum-config-manager \
    --add-repo \
    http://mir
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值