1 安装 jenkins
1.1 helm 版本
$ helm version
version.BuildInfo{Version:"v3.1.2", GitCommit:"d878d4d45863e42fd5cff6743294a11d28a9abce", GitTreeState:"clean", GoVersion:"go1.13.8"}
1.2 helm 镜像库
$ helm repo list
NAME URL
stable http://mirror.azure.cn/kubernetes/charts
aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
1.3 安装 jenkins
$ helm install jenkins-dev stable/jenkins --namespace jenkins --set persistence.enabled=false --set master.serviceType=NodePort --set master.targetPort=9090
1.4 使用 kubectl 工具查看 jenkins 状态
$ kubectl get pod,svc -n jenkins
NAME READY STATUS RESTARTS AGE
pod/jenkins-dev-7b4555b5d7-fv75m 1/1 Running 0 12m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/jenkins-dev NodePort 10.98.179.120 <none> 8080:31807/TCP 12m
service/jenkins-dev-agent ClusterIP 10.99.14.16 <none> 50000/TCP 12m
1.5 使用 helm 查看 Jenkins 状态
$ helm list --namespace jenkins
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
jenkins-dev jenkins 1 2020-04-13 18:05:55.318386904 +0800 CST deployed jenkins-1.12.0 lts
1.6 卸载 Jenkins
$ helm uninstall jenkins-dev --namespace jenkins
2 jenkins 插件kubernetes
(未完待续)