[英]Deploying in 1.24 version Kubernetes
As you already know, Kube.netes in version 1.24 is moving on from DockerShim.如您所知,1.24 版的 Kube.netes 正在从 DockerShim 向前发展。
I will need your help here because all of our deployments in Jenkins are running through a Docker Pod agent via Kube.netes plugin from Jenkins.我在这里需要你的帮助,因为我们在 Jenkins 中的所有部署都通过 Jenkins 的 Kube.netes 插件通过 Docker Pod 代理运行。
I will give you an example of part from our pipelines in Jenkins:我将在 Jenkins 中为您提供我们管道中的一部分示例:
agent {
kubernetes {
// label 'test'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
component: ci
spec:
# Use service account that can deploy to all namespaces
serviceAccountName: jenkins
containers:
- name: docker
image: docker:latest
#image: debian:buster
command:
- cat
tty: true
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
"""
And then basically in this stage we build our image:然后基本上在这个阶段我们建立我们的形象:
stage('Create & Tag Image') {
steps {
container('docker') {
sh '''
aws ecr get-login-password --region eu-central-1 | docker login --username AWS --password-stdin < AWS ECR URL >
docker build --build-arg -t < AWS ECR URL > --network=host .
'''
}
}
The result is the error that doesn't listen to the docker socket as i mention in version 1.24 Kube.netes doesnt support docker daemon anymore.结果是不听 docker 套接字的错误,正如我在 1.24 版中提到的那样 Kube.netes 不再支持 docker 守护进程。
I would like to ask you how you deploy now in Kube.netes 1.24.我想问一下你现在在 Kube.netes 1.24 中是如何部署的。
I read that there are some tools img , buildah , kaniko , or buildkit-cli-for-kubectl that don't require Docker.我读到有一些工具img 、 buildah 、 kaniko或buildkit-cli-for-kubectl不需要 Docker。
Can you recommend me any solution or help in this subject?你能推荐我这个主题的任何解决方案或帮助吗?
We are using EKS from AWS.我们正在使用来自 AWS 的 EKS。
Thank you谢谢
You can try Mirantis cri-dockerd , some explanations can be found here .你可以试试 Mirantis cri-dockerd ,一些解释可以在这里找到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.