I have installed GitHub - jenkinsci/helm-charts: Jenkins helm charts in my GKE autopilot cluster. I have the following kubernetes clouds agents configuration
jenkins:
clouds:
- kubernetes:
containerCap: 10
containerCapStr: "10"
jenkinsTunnel: "jenkins-agent.jenkins:8081"
jenkinsUrl: "https://jenkins.jenkins:8080"
name: "kubernetes"
templates:
- containers:
- alwaysPullImage: true
args: "^${computer.jnlpmac} ^^${computer.name}"
envVars:
- envVar:
key: "JENKINS_URL"
value: "http://jenkins.jenkins.svc.cluster.local:8080/"
image: "jenkins/inbound-agent:3261.v9c670a_4748a_9-1"
livenessProbe:
failureThreshold: 0
initialDelaySeconds: 0
periodSeconds: 0
successThreshold: 0
timeoutSeconds: 0
name: "jnlp"
resourceLimitCpu: "512m"
resourceLimitMemory: "512Mi"
resourceRequestCpu: "512m"
resourceRequestMemory: "512Mi"
workingDir: "/home/jenkins/agent"
id: "f0614e23-ddff-4626-b30f-bd709ca7e54e"
label: "kubeagent"
name: "kube-agent"
namespace: "jenkins"
podRetention: "never"
serviceAccount: "jenkins"
volumes:
- persistentVolumeClaim:
claimName: "jenkins-agents"
mountPath: "/var/run/docker.sock"
readOnly: false
yamlMergeStrategy: "override"
however when I create a job for running on the agent, the pods get created but there are no logs or events
kubectl get pods -n jenkins
NAME READY STATUS RESTARTS AGE
jenkins-0 3/3 Running 0 14m
kube-agent-cjgnj 0/2 Pending 0 11s
I also described the pods
kubectl describe pods kube-agent-cjgnj -n jenkins
Name: kube-agent-cjgnj
Namespace: jenkins
Priority: 0
Service Account: jenkins
Node: <none>
Labels: autopilot.gke.io/allow-net-admin=true
jenkins=agent
jenkins/label=kubeagent
jenkins/label-digest=ffa3ba115a1a18165cef0867902fabef92179d38
kubernetes.jenkins.io/controller=https___jenkins_jenkins_8080x
security.istio.io/tlsMode=istio
service.istio.io/canonical-name=kube-agent-cjgnj
service.istio.io/canonical-revision=latest
Annotations: autopilot.gke.io/resource-adjustment:
{"input":{"initContainers":[{"limits":{"cpu":"2","memory":"1Gi"},"requests":{"cpu":"100m","memory":"128Mi"},"name":"istio-init"}],"contain...
autopilot.gke.io/warden-version: 3.0.31
istio.io/rev: default
kubectl.kubernetes.io/default-container: jnlp
kubectl.kubernetes.io/default-logs-container: jnlp
kubernetes.jenkins.io/last-refresh: 1726176871875
prometheus.io/path: /stats/prometheus
prometheus.io/port: 15020
prometheus.io/scrape: true
sidecar.istio.io/status:
{"initContainers":["istio-init"],"containers":["istio-proxy"],"volumes":["workload-socket","credential-socket","workload-certs","istio-env...
Status: Pending
SeccompProfile: RuntimeDefault
IP:
IPs: <none>
Init Containers:
istio-init:
Image: docker.io/istio/proxyv2:1.23.1
Port: <none>
Host Port: <none>
Args:
istio-iptables
-p
15001
-z
15006
-u
1337
-m
REDIRECT
-i
*
-x
-b
*
-d
15090,15021,15020
--log_output_level=default:info
Limits:
cpu: 2
ephemeral-storage: 2Gi
memory: 1Gi
Requests:
cpu: 100m
ephemeral-storage: 2Gi
memory: 128Mi
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-b2cbv (ro)
Containers:
jnlp:
Image: jenkins/inbound-agent:3261.v9c670a_4748a_9-1
Port: <none>
Host Port: <none>
Args:
8cf6981f85ad21374d98e4bb3aaf025ad7687b8bacc0c733732ecd91225f7e64
^kube-agent-cjgnj
Limits:
cpu: 512m
ephemeral-storage: 1Gi
memory: 512Mi
Requests:
cpu: 512m
ephemeral-storage: 1Gi
memory: 512Mi
Environment:
JENKINS_SECRET: 8cf6981f85ad21374d98e4bb3aaf025ad7687b8bacc0c733732ecd91225f7e64
JENKINS_TUNNEL: jenkins-agent.jenkins:8081
JENKINS_AGENT_NAME: kube-agent-cjgnj
REMOTING_OPTS: -noReconnectAfter 1d
JENKINS_NAME: kube-agent-cjgnj
JENKINS_AGENT_WORKDIR: /home/jenkins/agent
JENKINS_URL: http://jenkins.jenkins.svc.cluster.local:8080/
Mounts:
/home/jenkins/agent from workspace-volume (rw)
/var/run/docker.sock from volume-0 (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-b2cbv (ro)
istio-proxy:
Image: docker.io/istio/proxyv2:1.23.1
Port: 15090/TCP
Host Port: 0/TCP
Args:
proxy
sidecar
--domain
$(POD_NAMESPACE).svc.cluster.local
--proxyLogLevel=warning
--proxyComponentLogLevel=misc:error
--log_output_level=default:info
Limits:
cpu: 2
ephemeral-storage: 1Gi
memory: 1Gi
Requests:
cpu: 100m
ephemeral-storage: 1Gi
memory: 128Mi
Readiness: http-get http://:15021/healthz/ready delay=0s timeout=3s period=15s #success=1 #failure=4
Startup: http-get http://:15021/healthz/ready delay=0s timeout=3s period=1s #success=1 #failure=600
Environment:
PILOT_CERT_PROVIDER: istiod
CA_ADDR: istiod.istio-system.svc:15012
POD_NAME: kube-agent-cjgnj (v1:metadata.name)
POD_NAMESPACE: jenkins (v1:metadata.namespace)
INSTANCE_IP: (v1:status.podIP)
SERVICE_ACCOUNT: (v1:spec.serviceAccountName)
HOST_IP: (v1:status.hostIP)
ISTIO_CPU_LIMIT: 2 (limits.cpu)
PROXY_CONFIG: {}
ISTIO_META_POD_PORTS: [
]
ISTIO_META_APP_CONTAINERS: jnlp
GOMEMLIMIT: 1073741824 (limits.memory)
GOMAXPROCS: 2 (limits.cpu)
ISTIO_META_CLUSTER_ID: Kubernetes
ISTIO_META_NODE_NAME: (v1:spec.nodeName)
ISTIO_META_INTERCEPTION_MODE: REDIRECT
ISTIO_META_WORKLOAD_NAME: kube-agent-cjgnj
ISTIO_META_OWNER: kubernetes://apis/v1/namespaces/jenkins/pods/kube-agent-cjgnj
ISTIO_META_MESH_ID: cluster.local
TRUST_DOMAIN: cluster.local
Mounts:
/etc/istio/pod from istio-podinfo (rw)
/etc/istio/proxy from istio-envoy (rw)
/var/lib/istio/data from istio-data (rw)
/var/run/secrets/credential-uds from credential-socket (rw)
/var/run/secrets/istio from istiod-ca-cert (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-b2cbv (ro)
/var/run/secrets/tokens from istio-token (rw)
/var/run/secrets/workload-spiffe-credentials from workload-certs (rw)
/var/run/secrets/workload-spiffe-uds from workload-socket (rw)
Volumes:
workload-socket:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
credential-socket:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
workload-certs:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
istio-envoy:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium: Memory
SizeLimit: <unset>
istio-data:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
istio-podinfo:
Type: DownwardAPI (a volume populated by information about the pod)
Items:
metadata.labels -> labels
metadata.annotations -> annotations
istio-token:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 43200
istiod-ca-cert:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: istio-ca-root-cert
Optional: false
volume-0:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: jenkins-agents
ReadOnly: false
workspace-volume:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
kube-api-access-b2cbv:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: kubernetes.io/os=linux
Tolerations: kubernetes.io/arch=amd64:NoSchedule
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events: <none>
Controller logs
2024-09-12 21:22:45.893+0000 [id=44] INFO o.c.j.p.k.KubernetesLauncher#launch: Created Pod: kubernetes jenkins/kube-agent-w245h
2024-09-12 21:25:48.924+0000 [id=15] WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class org.csanchez.jenkins.plugins.kubernetes.PodTemplate#run: type is abstract but not Describable.
2024-09-12 21:25:48.925+0000 [id=15] WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class org.csanchez.jenkins.plugins.kubernetes.PodTemplate#listener: type is abstract but not Describable.
2024-09-12 21:34:02.604+0000 [id=100] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 49216f6d-f96c-42fe-ba77-a333d86d9223
java.lang.Exception: Could not cancel run for id 6
ol.runJob(QueuedThreadPool.java:979)
2024-09-12 21:34:18.611+0000 [id=153] INFO o.c.j.p.k.KubernetesSlave#_terminate: Terminating Kubernetes instance for agent kube-agent-w245h
2024-09-12 21:34:18.741+0000 [id=163] INFO o.c.j.p.k.p.r.Reaper$RemoveAgentOnPodDeleted#onEvent: jenkins/kube-agent-w245h was just deleted, so removing corresponding Jenkins agent
2024-09-12 21:34:19.013+0000 [id=153] INFO o.c.j.p.k.KubernetesSlave#deleteSlavePod: Terminated Kubernetes instance for agent jenkins/kube-agent-w245h
2024-09-12 21:34:19.022+0000 [id=153] INFO o.c.j.p.k.KubernetesSlave#_terminate: Disconnected computer kube-agent-w245h
2024-09-12 21:34:31.907+0000 [id=166] INFO hudson.slaves.NodeProvisioner#update: kube-agent-cjgnj provisioning successfully completed. We have now 2 computer(s)
2024-09-12 21:34:32.417+0000 [id=170] INFO o.c.j.p.k.KubernetesLauncher#launch: Created Pod: kubernetes jenkins/kube-agent-cjgnj
2024-09-12 21:39:26.153+0000 [id=44] WARNING o.c.j.p.k.KubernetesLauncher#launch: Error in provisioning; agent=KubernetesSlave name: kube-agent-w245h, template=f0614e23-ddff-4626-b30f-bd709ca7e54e
io.fabric8.kubernetes.client.KubernetesClientTimeoutException: Timed out waiting for [1000000] milliseconds for [Pod] with name:[kube-agent-w245h] in namespace [jenkins].
Can you let me know the reason the pods are not up
Jenkins image tag: 2.476
Kubernetes plugin : 4287.v73451380b_576
Inbound-agents image tag: 3261.v9c670a_4748a_9-1