0

I am following a tutorial to implement hyperledger fabric in kubernetes by setting up a minikube server in a kvm2 virtual machine while on an Ubuntu 18.04. base operating system. At some point I need to

curl https://dubi/cainfo ,

where dubi is a host defined in /etc/hosts and pointing to the minikube server's IP, but I get following error:

curl: (60) SSL certificate problem: unable to get local issuer certificate

When doing

curl https://dubi/cainfo -k ,

it works as intended and I can see a certificate. I was wondering if there is a way to make the minikube server tls-callable?

What I tried so far is to write an extension for the kubernetes service running in minikube:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: mock-server
spec:
  tls:
    - secretName: dubi-tls
      hosts:
        - dubi
  rules:
  - host: dubi
    http:
      paths:
        - path: /
          backend:
            serviceName: kubernetes
            servicePort: 443 ,

create a tls key with

openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout dubi.key -out dubi.crt -subj "/CN=dubi" -days 365,

and

kubectl apply -f kubernetes.yaml.

Unfortunately, that does not work, I still get the error mentioned above. Are there any errors in what I tried to do or is there a better and working way to do this?

1 Answer 1

0

The problem with the standard certificate ca--tls is that it only has a key and does not have a .crt entry. Creating a key pair with openssl, generating a secret, telling the ca-hlf service to use these as certificates, and adding certificate and key to /etc/ssl/certs and /etc/ssl/private did the trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .