# k8s-document **Repository Path**: zhengyansheng/k8s-document ## Basic Information - **Project Name**: k8s-document - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-30 - **Last Updated**: 2021-04-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Kubernetes文档 ## 1 . Jenkins - 以 容器 的方式安装 ```bash # docker pull jenkinsci/blueocean # docker run \ -u root \ -d \ -p 8080:8080 \ -p 50000:50000 \ -v jenkins-data:/var/jenkins_home \ -v /etc/localtime:/etc/localtime:ro \ -v /var/run/docker.sock:/var/run/docker.sock \ --restart=always \ jenkinsci/blueocean ``` - 登陆 Jenkins 的页面 ```bash # docker ps | grep jenkins fc92981d795a jenkinsci/blueocean "/sbin/tini -- /usr/…" 9 seconds ago Up 8 seconds 0.0.0.0:8080->8080/tcp, 0.0.0.0:50000->50000/tcp relaxed_poincare # docker logs fc92981d795a ... 8b8bf88b206641e4bb494fffaddb1382 ... ``` - 查看 Volume 的详情 ```bash # docker volume inspect jenkins-data [ { "CreatedAt": "2021-04-30T17:13:34+08:00", "Driver": "local", "Labels": null, "Mountpoint": "/var/lib/docker/volumes/jenkins-data/_data", # Jenkins的核心数据都存储在这个目录中, 一定要做好备份。 "Name": "jenkins-data", "Options": null, "Scope": "local" } ] # ls -ll /var/lib/docker/volumes/jenkins-data/_data 总用量 72 -rw-r--r-- 1 root 1000 1600 4月 30 17:06 config.xml -rw-r--r-- 1 root 1000 4122 4月 30 17:05 copy_reference_file.log -rw-r--r-- 1 root 1000 156 4月 30 17:05 hudson.model.UpdateCenter.xml -rw-r--r-- 1 root 1000 370 4月 30 17:05 hudson.plugins.git.GitTool.xml -rw------- 1 root 1000 1712 4月 30 17:05 identity.key.enc -rw-r--r-- 1 root 1000 7 4月 30 17:13 jenkins.install.InstallUtil.lastExecVersion -rw-r--r-- 1 root 1000 7 4月 30 17:13 jenkins.install.UpgradeWizard.state -rw-r--r-- 1 root 1000 183 4月 30 17:13 jenkins.model.JenkinsLocationConfiguration.xml -rw-r--r-- 1 root 1000 171 4月 30 17:05 jenkins.telemetry.Correlator.xml drwxr-sr-x 2 root 1000 6 4月 30 17:05 jobs drwxr-sr-x 4 root 1000 37 4月 30 17:05 logs -rw-r--r-- 1 root 1000 907 4月 30 17:05 nodeMonitors.xml drwxr-sr-x 2 root 1000 6 4月 30 17:05 nodes drwxr-sr-x 110 root 1000 16384 4月 30 17:13 plugins -rw-r--r-- 1 root 1000 64 4月 30 17:05 secret.key -rw-r--r-- 1 root 1000 0 4月 30 17:05 secret.key.not-so-secret drwx------ 4 root 1000 336 4月 30 17:13 secrets drwxr-sr-x 2 root 1000 182 4月 30 17:13 updates drwxr-sr-x 2 root 1000 24 4月 30 17:05 userContent drwxr-sr-x 3 root 1000 56 4月 30 17:13 users drwxr-sr-x 11 root 1000 4096 4月 30 17:05 war drwxr-sr-x 2 root 1000 6 4月 30 17:05 workflow-libs ```