栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

gitlab-runner k8s cicd小demo

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

gitlab-runner k8s cicd小demo

    安装helm3
    wget http://xxxx
    mv helm /usr/local/bin安装gitlab-runner到k8s
    helm repo add gitlab https://charts.gitlab.io
    编辑values.yaml
    imagePullPolicy: IfNotPresent
    gitlabUrl: "http://192.168.222.130:9980"
    runnerRegistrationToken: "131yjJMtno82us1B3C5t"
    concurrent: 10
    checkInterval: 30
    logLevel: info
    
    rbac:
      create: true
    
    metrics:
      enabled: false
    
    runners:
      config: |
        [[runners]]
          clone_url = "http://192.168.222.130:9980"
          [runners.kubernetes]
            namespace = "{{.Release.Namespace}}"
            image = "ubuntu:20.04"
            [[runners.kubernetes.volumes.host_path]]
                name = "docker"
                mount_path = "/var/run/docker.sock"
                host_path = "/var/run/docker.sock"
      privileged: "true"
      name: kubernetes-runner
      tags: "kubernetes,runner"
    
    securityContext:
      runAsUser: 100
      fsGroup: 65533
    
    创建命名空间
    kubectl create ns kubeops
    安装
    helm install --namespace kube-ops gitlab-ops-runner -f values.yaml gitlab/gitlab-runner编写.gitlab-ci.yml测试
    image: ubuntu
    
    stages:
      - build
    
    build:
      stage: build
      tags:
        - kubernetes
      script:
        - echo "123"
    
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/705711.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号