Unable to use chectl for OpenShift platform
When attempting to run chectl using the Openshift platform I get the following error:
- "http:" not supported. Expected "https:"
The full log can be seen below:
$ chectl server:start --platform=openshift --domain=apps.company.aws.local ✖ Verify Kubernetes API → Failed to connect to Kubernetes API. E_CHECTL_UNKNOWN_ERROR - Message: Protocol "http:" not supported. Expected "https:" 👀 Looking for an already existing Che instance › Error: Failed to connect to Kubernetes API. E_CHECTL_UNKNOWN_ERROR - Message: Protocol "http:" not supported. Expected "https:"
@sleshchenko @amisevsk Could you have a look pls?
Seems like a bug: Unable to use chectl if K8s/OS cluster use non-secure connection (http). I guess we should analyze the current content and choose the right agent https://github.com/che-incubator/chectl/blob/b9f6ac7ada95d8b8a99c308f521bb8a96bcec15b/src/api/kube.ts#L895
@andy316x Could you provide more info about your OpenShift installation? Does it really use http but not https?
@sleshchenko my installation of Openshift does use https, at the minute it is using certificates signed by Openshift while I wait for certificates signed by our private CA, nonetheless once I get certificates signed they will still not be signed by a public authority.
@andy316x Seems something is wrong with the currect cluster.
Could you check output of oc config current-context, oc config view, is protocol https for you cluster?
Check also like oc get pods to make sure that oc does not have the same issue.
$ oc config current-context
che/console-company-aws-local:443/user1
$ oc config view
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: REDACTED
server: https://console.company.aws.local:443
name: console-company-aws-local:443
- cluster:
certificate-authority-data: REDACTED
server: https://console-int.company.aws.local:443
name: console-int-company-aws-local:443
contexts:
- context:
cluster: console-company-aws-local:443
namespace: che
user: user1/console-company-aws-local:443
name: che/console-company-aws-local:443/user1
- context:
cluster: console-company-aws-local:443
namespace: default
user: system:admin/console-int-company-aws-local:443
name: default/console-company-aws-local:443/system:admin
- context:
cluster: console-company-aws-local:443
namespace: default
user: user1/console-company-aws-local:443
name: default/console-company-aws-local:443/user1
- context:
cluster: console-int-company-aws-local:443
namespace: default
user: system:admin/console-int-company-aws-local:443
name: default/console-int-company-aws-local:443/system:admin
- context:
cluster: console-company-aws-local:443
namespace: eclipse-che2
user: user1/console-company-aws-local:443
name: eclipse-che2/console-company-aws-local:443/user1
- context:
cluster: console-company-aws-local:443
namespace: hello-world
user: user1/console-company-aws-local:443
name: hello-world/console-company-aws-local:443/user1
current-context: che/console-company-aws-local:443/user1
kind: Config
preferences: {}
users:
- name: system:admin/console-int-company-aws-local:443
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
- name: user1/console-company-aws-local:443
user:
token: jFF0cZ6aggYf2pUMyfEXsnF5WzzR1eC85-p-yU1rKj4
$ oc get pods
No resources found.
Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen label to avoid stale mode.