当前位置:网站首页>Kubernetes 1.20.5 helm installation Jenkins

Kubernetes 1.20.5 helm installation Jenkins

2022-06-24 17:05:00 I have nothing to do with you

Initial environment

kubeadm build kubenretes 1.20.5 Clusters are as follows

image.png

front https://www.yuque.com/duiniwukenaihe/ehb02i/dkwh3p Installed when cilium hubble Installed when helm3.

Storage integrates Tencent cloud Of cbs Block storage

The Internet ? traefik agent ( pure http, All certificates to Tencent cloud load balancing clb 了 )

Prepare the integration plan cicd Or go through the traditional jenkins github spinnaker These kinds of integration . First, build a basic environment . From jenkins Here we go

1. Again helm3 Installation

1. download helm Applications

 https://github.com/helm/helm/releases

Now the latest version 3.5.3 Well ? Find the package download of the corresponding system platform

image.png

2. install helm

Upload tar.gz Package to server ( I am a master Random nodes are OK )

tar zxvf helm-v3.5.3-linux-amd64.tar.gz
 mv linux-amd64/helm /usr/bin/helm

ok helm Installation successful

image.png

2. jenkins Configuration and installation of

2.1. helm add to jenkins Warehouse . and pull Next jenkins Version pack

helm repo add jenkins https://charts.jenkins.io
helm pull jenkins/jenkins
# My version is still 3.3.0 The same goes for other versions 
tar zxvf jenkins-3.3.0.tgz

2.2. Change... According to personal needs value.yaml

cd jenkins Catalog , take values.yaml The installation needs to be changed

The individual has modified clusterZone And the default storage uses Tencent cloud's cbs.

image.png
image.png

3. helm install jenkins To designate namespace

3.1. Normal installation process

kubectl create ns kube-ops
helm install -f values.yaml jenkins  jenkins/jenkins -n kube-ops
image.png

3.2. Installing int Download plug-ins waiting for too long

Downloading plug-ins is a mess , Can't wait for time to value.yaml The process of installing plug-ins in the file is commented out .

image.png

Comment out install Install the plug-in manually behind

image.png

I commented it out and deleted it helm The deployment process has been restarted .

helm delete jenkins -n kube-ops
helm install -f values.yaml jenkins  jenkins/jenkins -n kube-ops

As expected, the comment is deleted and the system is started directly

4. Some things after initialization

4.1. wait for pod Initialization startup complete

image.png

4.2 The initialization password is log Search for

Look for the password in the traditional way first :

kubectl logs -f jenkins-0 jenkins -n kube-ops

Well, the password isn't there log Medium

image.png

4.3. Get it right jenkins The way of initial password secret

printf $(kubectl get secret --namespace kube-ops jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo

5. traefik agent jenkins application

https://www.yuque.com/duiniwukenaihe/ehb02i/odflm7 The way of construction and agency has been indicated above )

image.png

Still used to ingressroute agent jenkins

cat jenkins-ingress.yaml

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  namespace: kube-ops
  name: jenkins-http
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`jenkins.saynaihe.com`)
      kind: Rule
      services:
        - name: jenkins
          port: 8080

kubectl apply -f jenkins-ingress.yaml

6. web visit jenkins application

6.1. land jenkins web

image.png

what I didn't enter the account and password ? I don't know why I can log in for the first time after initialization without a password .......

6.2 Change security settings , Users are not allowed to log in anonymously

image.png

Create the initial administrator user

image.png

6.3 Install Chinese plug-in

image.png

OK Start installing the plug-ins , Install the Chinese plugin first , Restart after installation ....

image.png

The Chinese plug-in installation is completed . Well, my personal password is still valid here ......

image.png

6.4 Install it. helm Plug ins masked during initialization

Then helm Manually install the initialization plug-ins shielded in ? Just install the following four plug-ins manually . It's also common kubernetes plug-in unit .

image.png

Wait until it's done . restart jenkins application

image.png

7. Colored eggs

Um. My password is wrong after restart ...what

With the idea of trying, I drove into above 4.3 What I got in step key ok Went in. .....

image.png

Here is a simple record of the application installation process , Concrete jenkins libraries pipeline and kubernetes spinnaker gitlab All the environments such as the integration of have been built and written together .

原网站

版权声明
本文为[I have nothing to do with you]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/03/20210331192137023o.html