[英]How to run on jenkins + docker + kubernetes localy
我正在嘗試執行Jenkins提供的文檔以使用 Kubernetes + Docker + Z2ADAE54334C453ABCE2E3E55A。 I'm doing that on my Ubuntu desktop and, in the end, the URL ( http://192.168.49.2:32000/login ) to Jenkins can't be reached (I've got "Refused to connect"). 我對 docker 和 Kube 非常陌生,我什至不知道如何調試它以嘗試發現問題。
我想知道我可以使用哪些命令來調試它並解決問題。
由於您沒有運行 pod,因此請確保創建一個部署文件,該文件應該是 jenkins-deployment.yaml 文件,其中包含以下內容:
apiVersion: apps/v1
kind: Deployment
metadata:
name: jenkins
spec:
replicas: 1
selector:
matchLabels:
app: jenkins
template:
metadata:
labels:
app: jenkins
spec:
containers:
- name: jenkins
image: jenkins/jenkins:lts-jdk11
ports:
- containerPort: 8080
volumeMounts:
- name: jenkins-home
mountPath: /var/jenkins_home
volumes:
- name: jenkins-home
emptyDir: { }
之后,通過運行以下命令進行部署:
kubectl create -f jenkins-deployment.yaml -n jenkins
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.