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?