knative helloworld does not run microk8s due to x509 certificate issue - microk8s

I have installed knative on microk8s using ubuntu (Ubuntu 20.04 LTS). I am trying basic knative example , but it's not working.
1. First I've tried with kn. (kn was not able to read configuration, so I've exported the configuration using microk8s.config > ~/kubeconfig
kn --kubeconfig ~/kubeconfig service create hello --image gcr.io/knative-samples/helloworld-go --env TARGET=Knative
Internal error occurred: failed calling webhook "webhook.serving.knative.dev": Post "https://webhook.knative-serving.svc:443/defaulting?timeout=30s": x509: certificate is not valid for any names, but wanted to match webhook.knative-serving.svc
I've tried to load using kubectl create, but getting the same error.
Any idea.

What version of Knative are you using?
It looks like your Knative webhook may be generating a certificate with an empty subject. Have you tried connecting to the webhook directly on the cluster via curl -kvv https://webhook.knative-serving.svc:443/defaulting? That should print out the certificate and ignore the validation so that you can test that the service is working.

Related

Docker error "https://registry-1.docker.io/v2/": x509 certifacte not valid for registry-1.docker.io in macOS

I am setting up the airflow in my macOS using Docker and I am encountering this below error while doing the setup. Any help would be appreciated.
ERROR: Get "https://registry-1.docker.io/v2/": x509: certificate is valid for *.integration.livongo.com, integration.livongo.com, not registry-1.docker.io
Thanks.
I have had the same issue this week when upgrading to the latest Docker Desktop 4.4.4.
I am behind a company proxy which injects it's own CA certificate which can cause this problem. If that is your case, make sure you know what is the http & https proxy URL or IP if there is one, and add it in the Docker Desktop settings, under Resources/Proxies.
You may also add the http_proxy and https_proxy environment variables to your system with the full url,IP of the proxy server.
If the problem persists, roll back to a previous version of Docker Desktop. That's what I ended up doing in the end because the latest version didn't work with my proxy configuration.

"message": "cURL error 60: SSL: no alternative certificate subject name matches target host name 'api-.pusher.com'

We are implementing a custom chat in a web application using Laravel and pusher. The basic functionalities like sending and receiving messages with file-sharing were working perfectly fine for few days but all of a sudden we encountered an error as follows:
"message": "cURL error 60: SSL: no alternative certificate subject
name matches target host name 'api-.pusher.com' (see
https://curl.haxx.se/libcurl/c/libcurl-errors.html) for
https://api-.pusher.com/apps//events?auth_key=&auth_timestamp=1622911129&auth_version=1.0&body_md5=994999b61168dbbbb9172e79341131b8&auth_signature=51992f8acbe3f6943163bb358399f30b7d8020d30a5d121e1650953480642397",
"exception": "GuzzleHttp\Exception\RequestException",
"file": "/home/techfin/public_html/testtest.com/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
"line": 211
It works perfectly fine on the local machine but causes problems on the server.
I think you should install the CURL extension as below (on Linux):
sudo apt-get install php-curl
This will install a dependency package, which depends on the default PHP version. After that restart apache
sudo service apache2 restart
on windows:
read this article
You're missing the cluster ID from the curl. Normally you'd have an API URL like https://api-mt1.pusher.com. You can find the cluster for your app in the Pusher dashboard.

Docker For Mac / Lando: cannot cURL external webservice

I am testing out Lando for a new local dev setup.
Everything has gone well so far but I am running into an error that I don't get on my old Vagrant/VM environment, but do with Lando.
We have part of the site that uses Guzzle to fetch data from a web service. On Lando, I get a cURL error:
cURL error 7: Failed to connect to webservice.internalsite.com port 80: No route to host
How can I resolve this? When I try to ping that url, it says "Destination host unreachable". I am using Docker For Mac if that factors in.

Docker: Unable to get the latest Boot2Docker ISO release version on initial setup behind corporate proxy

I installed DockerToolbox-1.11.2 on Mac ElCapitan. When i try to run the "Docker Quickstart Terminal" i get an error as below
Running pre-create checks... (default) Unable to get the latest
Boot2Docker ISO release version: Get
https://api.github.com/repos/boot2docker/boot2docker/releases/latest:
x509: certificate signed by unknown authority Creating machine...
(default) Unable to get the latest Boot2Docker ISO release version:
Get
https://api.github.com/repos/boot2docker/boot2docker/releases/latest:
x509: certificate signed by unknown authority.
But it seem to have created the VM.
When i run any docker command it ends up with a timeout error.
An error occurred trying to connect: Get
https://192.168.99.100:2376/v1.23/containers/json: Gateway Timeout
But when i try to run "docker run" on docker-machine it gives the same error as the initial one.
docker#default:~$ docker run hello-world
Unable to find image'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
docker: Error while pulling image: Get
https://index.docker.io/v1/repositories/library/hello-world/images:
x509: certificate signed by unknown authority.
See 'docker run --help'.
I guess the issue is related to proxy certificates, tried searching for a solution to this issue but have not found any yet.
Will appreciate any help regarding this.

Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)+openshift

i cant connect to my application on openshift using rhc command
here is what i get when trying to connect
C:\Users\soulhiS>rhc ssh myapp
DL is deprecated, please use Fiddle
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Connecting to 56e736655650001b4#myapp-mydomain.rhcloud.com ...
Using username "56e736655650001b4".
FATAL ERROR: Disconnected: No supported authentication methods available(server sent: publickey,gssapi-keyex,gssapi-with-mic)
Make sure that your ssh key is accessible (run the command line as administrator, if needed) and it is the one OpenShift expects - i.e. check that a corresponding public key is uploaded to OpenShift. For uploading your public ssh key to OpenShift, you can run rhc setup.

Resources