镜像仓库
镜像仓库负责存储、管理和分发镜像
镜像仓库管理多个repository,repository通过命名来区分,镜像通过镜像名称和标签来区分
镜像仓库遵循OCI的Distribution Spec
元数据和块文件
元数据
- 用于描述镜像的核心信息,包含镜像仓库、仓库、标签、校验码、文件层、镜像构建描述信息等。
- 通过这些信息可以从抽象层完整描述一个镜像
- 如何构建
- 运行的构建命令
- 构建的每一文件层的校验码、标签、镜像的校验码
块文件
- 块文件是组成镜像的联合文件层的实体,每一个块文件都是一个文件层,里面包含对应文件层的变更
harbor
install jenkins on k8s
查看jenkins密码
kubectl logs jenkins-0
关键字 password
Please use the following password to proceed to installation:
82bf7144dc134690b447b548d2517c0d
在公网,使用nginx代理访问ip:NodePort方式访问jenkins
upstream jenkins {
server 172.31.0.173:30049;
}
server {
listen 11000;
location / {
proxy_pass http://jenkins;
sendfile off;
proxy_set_header Host $host:$server_port;
# Forwards the real visitor remote IP address to the proxied server.
proxy_set_header X-Real-IP $remote_addr;
# A list containing the IP addresses of every server the client has been proxied through.
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 0;
# This is the maximum upload size
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_temp_file_write_size 64k;
# Defines the HTTP protocol version for proxying, by default it it set to 1.0. For Websockets and keepalive connections you need to use the version 1.1
proxy_http_version 1.1;
proxy_request_buffering off;
proxy_buffering off; # Required for HTTP-based CLI to work over SSL
}
}
Manage Jenkins>>System Configuration >>Manage nodes and clouds>>Configure Clouds
安装插件
插件安装完成后,页面最下方提示重启。重启后会自动reload页面。
添加完凭据,选择对应的凭据就可以连接测试
配置jenkins地址
添加pod模板
添加容器
tekton
安装
https://tekton.dev/docs/pipelines/install/#installing-tekton-pipelines-on-kubernetes
exporter example
https://www.bilibili.com/video/BV1m54y1o79r?p=35&vd_source=4a365e7120f1f50c94e58114a4abbfd3