I have an account that can access a openstack site to do my work, and everytime when I was to execute any openstack cli command, I have to provide the extra "--insecure" option to make it work, something as follows:
>> openstack server list --insecure
+--------------------------------------+------------------------------+--------+-----------------------------------------------------+--------------------------+-----------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+------------------------------+--------+-----------------------------------------------------+--------------------------+-----------+
| 57bea5... | US-280-1 | ACTIVE | main_network=10.31.1.162, 10.96.129.112 | N/A (booted from volume) | m1.xlarge |
| 7ace60... | US-280-2 | ACTIVE | main_network=10.31.0.200, 10.96.130.120 | N/A (booted from volume) | m1.xlarge |
Anyway, today I want to create a k8s cluster by using the kubespray framework, and I have set the external_cloud_provider to be "openstack" too! Basic I am trying to learn how to do the k8s setup.
I have checked out code from this link, https://github.com/kubernetes-sigs/kubespray, and have run the setup without any error.
But after everything has setup and I was to check the pod status, I have seen a failed one:
>>kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system openstack-cloud-controller-manager-v2qb8 0/1 CrashLoopBackOff 12 (38s ago) 23m
...
And in the pod log, it says:
I1117 00:09:29.487677 1 serving.go:348] Generated self-signed cert in-memory
W1117 00:09:29.642451 1 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
W1117 00:09:29.642451 1 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
W1117 00:09:29.668751 1 openstack.go:173] New openstack client created failed with config: Post "http://<my_original_openstack_site>:5000/v3/auth/tokens": x509: certificate signed by unknown authority
F1117 00:09:29.668907 1 main.go:84] Cloud provider could not be initialized: could not init cloud provider "openstack": Post "https://<my_original_openstack_site>:5000/v3/auth/tokens": x509: certificate signed by unknown authority
I kind of have a feeling I need to set this flag "insecure=true" during this openstack cloud provider setup. Does anyone know where I should put this flag ?
Thanks a lot for the help.
Jack