docker / compose-on-kubernetes

Deploy applications described in Compose onto Kubernetes clusters
Apache License 2.0
1.42k stars 159 forks source link

Installation instructions needed for microk8s #53

Closed garethr closed 5 years ago

garethr commented 5 years ago

Installation on Microk8s, following the minikube instructions (expanded on https://collabnix.com/a-first-look-at-compose-on-kubernetes-for-minikube/) starts everything running:

$ kubectl get all --namespace compose
NAME                                                                  READY   STATUS             RESTARTS   AGE
pod/compose-68d845b598-9wg4x                                          0/1     CrashLoopBackOff   5          7m40s
pod/compose-api-5f4b9d785c-42kgf                                      0/1     CrashLoopBackOff   5          7m40s
pod/compose-etcd-client-4m5r9kkrwk                                    0/1     Init:0/1           0          11m
pod/etcd-operator-etcd-operator-etcd-backup-operator-59856df67qsbqb   1/1     Running            0          15m
pod/etcd-operator-etcd-operator-etcd-operator-796dccdf7f-46fvr        1/1     Running            0          15m
pod/etcd-operator-etcd-operator-etcd-restore-operator-55db95d6t64rv   1/1     Running            0          15m

NAME                                 TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
service/compose-api                  ClusterIP   10.152.183.62    <none>        443/TCP             7m40s
service/compose-etcd-client          ClusterIP   None             <none>        2379/TCP,2380/TCP   11m
service/compose-etcd-client-client   ClusterIP   10.152.183.105   <none>        2379/TCP            11m
service/etcd-restore-operator        ClusterIP   10.152.183.193   <none>        19999/TCP           15m

NAME                                                                READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/compose                                             0/1     1            0           7m40s
deployment.apps/compose-api                                         0/1     1            0           7m40s
deployment.apps/etcd-operator-etcd-operator-etcd-backup-operator    1/1     1            1           15m
deployment.apps/etcd-operator-etcd-operator-etcd-operator           1/1     1            1           15m
deployment.apps/etcd-operator-etcd-operator-etcd-restore-operator   1/1     1            1           15m

NAME                                                                           DESIRED   CURRENT   READY   AGE
replicaset.apps/compose-68d845b598                                             1         1         0       7m40s
replicaset.apps/compose-api-5f4b9d785c                                         1         1         0       7m40s
replicaset.apps/etcd-operator-etcd-operator-etcd-backup-operator-59856df67f    1         1         1       15m
replicaset.apps/etcd-operator-etcd-operator-etcd-operator-796dccdf7f           1         1         1       15m
replicaset.apps/etcd-operator-etcd-operator-etcd-restore-operator-55db95d6f8   1         1         1       15m

However the API server crashes before providing the API.

$ kubectl logs --namespace compose pod/compose-api-5f4b9d785c-42kgf    
ERROR: logging before flag.Parse: I0112 21:16:45.598859       1 plugins.go:158] Loaded 2 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,MutatingAdmissionWebhook.
ERROR: logging before flag.Parse: I0112 21:16:45.598949       1 plugins.go:161] Loaded 1 validating admission controller(s) successfully in the following order: ValidatingAdmissionWebhook.
ERROR: logging before flag.Parse: W0112 21:16:45.599137       1 client_config.go:552] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
ERROR: logging before flag.Parse: F0112 21:17:05.601791       1 storage_decorator.go:57] Unable to create storage backend: config (&{ /registry/docker.com/stacks [http://compose-etcd-client:2379]    true false 0 0xc000386000 <nil> 5m0s 1m0s}), err (dial tcp: lookup compose-etcd-client on 127.0.0.53:53: read udp 127.0.0.1:38953->127.0.0.53:53: read: connection refused)
simonferquel commented 5 years ago

I think the etcd instance name is wrong (should be compose-etcd, see the service/compose-etcd-client-client created).

The API server logs suggest that indeed, the etcd store backend cannot be initialized.

simonferquel commented 5 years ago

@ulyssessouza can you have a look at this ?

ulyssessouza commented 5 years ago

@simonferquel @garethr I've enumerated some problems in this blog post in https://github.com/docker/compose-on-kubernetes/pull/54#pullrequestreview-192107549

ijc commented 5 years ago

Since #54 was closed (as a docs fix AFAICT) is this one also now closable? /cc @simonferquel @ulyssessouza

ulyssessouza commented 5 years ago

@ijc For me yes