tencent cloud

Feedback

Deploying Jenkins on TKE

Last updated: 2023-05-06 17:36:46

    Overview

    Many DevOps requirements need to be implemented with Jenkins. This document describes how to deploy Jenkins in TKE.

    Prerequisites

    You have created a TKE cluster.

    Directions

    Installing Jenkins

    1. Log in to the TKE console and click Marketplace in the left sidebar.
    2. On the Marketplace page, search for Jenkins and go to the Jenkins application page.
    3. Click Create application and configure values.yaml in Parameter as needed.
    
    4. Click Create.

    Exposing Jenkins UI

    By default, you cannot access the Jenkins UI outside the cluster. To access the Jenkins UI, you can use an Ingress. TKE provides CLB-type Ingress and Nginx-type Ingress for your choice.
    Note
    Jenkins v2.263 is used in the following sample. The UI of Jenkins varies with the product version. You can select a version based on your business needs.

    Logging in to Jenkins

    On the Jenkins UI, enter the initial username and password to log in to the Jenkins backend. The username is admin, and the password can be obtained by running the following command.
    kubectl -n devops get secret jenkins -o jsonpath='{.data.jenkins-admin-password}' | base64 -d
    Note
    When running the above command, specify your actual namespace.

    Creating a user

    We recommend you manage Jenkins as a general user. Before creating a general user, you need to configure an authentication and authorization policy.
    1. Log in to the Jenkins backend and choose Dashboard > Manage Jenkins > Security > Configure Global Security to go to the authentication and authorization policy page as shown below:
    
    Security Realm: Select Jenkins' own user database.
    Authorization: Select Logged-in users can do anything.
    2. Choose Dashboard > Manage Jenkins > Security > Manage Users > Create User and create a user as prompted as shown below:
    
    Username: Enter the username.
    Password: Enter the password.
    Confirm password: Confirm the password.
    Full name: Enter the full username.
    3. Click Create User.

    Installing the plugin

    Log in to the Jenkins backend and choose Dashboard > Manage Jenkins > System Configuration > Manage Plugins to go to the plugin management page. You can install the following commonly used plugins:
    Kubernetes
    Pipeline
    Git
    GitLab
    GitHub
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support