Unable to use kubernetes executer for Gitlabs

0 votes

I'm getting the following error when I tray and set up kubernetes executor for Gitlab:
ERROR: Job failed (system failure): Post https://api.kubernetes.de/api/v1/namespaces/gitlab/pods: x509: certificate signed by unknown authority

my configmap.yml:

apiVersion: v1
kind: ConfigMap
metadata:
  name: gitlab-runner
  namespace: gitlab
data:
  config.toml: |
     concurrent = 4

[[runners]]
  name = "Kubernetes Runner"
  url = "http://########/ci"
  token = "############"
  executor = "kubernetes"
  [runners.kubernetes]
    host = "https://api.kubernetes.de"
    namespace = "gitlab"
    namespace_overwrite_allowed = "ci-.*"
    privileged = true
    cpu_limit = "1"
    memory_limit = "1Gi"
    service_cpu_limit = "1"
    service_memory_limit = "1Gi"
    helper_cpu_limit = "500m"
    helper_memory_limit = "100Mi"
    poll_interval = 5
    poll_timeout = 3600
    [runners.kubernetes.node_selector]
      gitlab = "true"

my deployment.yml:

 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
   name: gitlab-runner
   namespace: gitlab
 spec:
   replicas: 1
   selector:
     matchLabels:
       name: gitlab-runner
   template:
     metadata:
       labels:
         name: gitlab-runner
     spec:
       containers:
       - args:
         - run
         image: gitlab/gitlab-runner:latest
         imagePullPolicy: Always
         name: gitlab-runner
         volumeMounts:
         - mountPath: /etc/gitlab-runner
           name: config
         - mountPath: /etc/ssl/certs
           name: cacerts
           readOnly: true
       restartPolicy: Always
       volumes:
       - configMap:
           name: gitlab-runner
         name: config
       - hostPath:
           path: /usr/share/ca-certificates/mozilla
         name: cacerts
Dec 26, 2018 in Kubernetes by DragonLord999
• 8,450 points
1,514 views

1 answer to this question.

0 votes

You are trying to use https, so your certificates should be self signed. You'll have to add --tls-cert-file and --tls-private-key-file flagse in you configmap for your kubelet.

answered Dec 26, 2018 by DareDev
• 6,890 points

Related Questions In Kubernetes

0 votes
1 answer

Configure a Kubernetes-pod to use persistent volume for storage.

The output shows that the PersistentVolume has ...READ MORE

answered Jul 23, 2019 in Kubernetes by Sirajul
• 59,230 points
2,731 views
0 votes
1 answer

unable to start Kubernetes due to so many open files in system

You can try the following steps: You can ...READ MORE

answered May 1, 2018 in Kubernetes by shubham
• 7,340 points
2,042 views
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,300 points
2,426 views
+1 vote
1 answer

Unable to access kubernetes dashboard

You’re trying to access a private IP. ...READ MORE

answered Aug 27, 2018 in Kubernetes by Kalgi
• 52,360 points
2,856 views
+1 vote
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,943 views
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,360 points
1,353 views
0 votes
1 answer

Unable to get cgroup stats for docker and kubelet services

Try and start kubelet with the following ...READ MORE

answered Sep 3, 2018 in Kubernetes by DareDev
• 6,890 points
5,027 views
0 votes
1 answer

Kubernetes:Unable to mount volumes with cloud-provider

Kuberenetes 1.5.0 and 1.5.3 does support cinder. ...READ MORE

answered Nov 30, 2018 in Kubernetes by DareDev
• 6,890 points
4,801 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP