I have a microk8s cluster on a ubuntu laptop. I want to apply a deployment yaml file on it from azure devops pipeline.
I have successfully defined a Kubernetes Service connections in my devops and it went through verification. Though when I try to apply the yaml file I get these lines
/usr/bin/kubectl apply -f /home/vsts/work/1/s/devops/deploymen.yaml -o json
##[error]Unable to connect to the server: x509: certificate is valid for 127.0.0.1, 10.152.183.1, 192.168.50.69, 172.17.0.1, 10.1.80.0, not <my external IP>
192.168.50.69 is the ip of the laptop in my network
Where should I add my external IP?
EDIT :
I found Authentication and authorization and I edited /var/snap/microk8s/current/certs/csr.conf.template
so it includes my IP now.
The article says :
After changing, the apiserver-kicker will automatically detect the difference, generate new certs and restart the apiserver. Your DNS server settings and kubeconfig file must be updated appropriately.
The certificate in certificate-authority-data /var/snap/microk8s/current/certs/ca.crt
now looks different than the one from microk8s config
I also updated kubeconfig with as mentioned above
But still no luck !