tarantool/tarantool-operator

Getting 404 after deploying the kv example

pparshin opened this issue · 2 comments

Hi,
I've tried to deploy the KV example using your documentation but unfortunately getting the 404 Not Found error from Nginx. Could you please help me to find the problem?

Steps to reproduce:

  1. Firstly I tried minikube, after that I installed kind and nginx ingress controller.
kind create cluster --config kind-config.yaml --image=kindest/node:v1.19.4
  1. Installed the tarantool operator using your doc
  2. Deployed the app

On step "Ensure cluster became operational" I don't see any status:

$ kubectl -n tarantool describe clusters.tarantool.io examples-kv-cluster
Name:         examples-kv-cluster
Namespace:    tarantool
Labels:       app.kubernetes.io/managed-by=Helm
Annotations:  meta.helm.sh/release-name: examples-kv-cluster
              meta.helm.sh/release-namespace: tarantool
API Version:  tarantool.io/v1alpha1
Kind:         Cluster
Metadata:
  Creation Timestamp:  2021-04-12T12:39:21Z
  Generation:          1
  Managed Fields:
    API Version:  tarantool.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:meta.helm.sh/release-name:
          f:meta.helm.sh/release-namespace:
        f:labels:
          .:
          f:app.kubernetes.io/managed-by:
      f:spec:
        .:
        f:selector:
          .:
          f:matchLabels:
            .:
            f:tarantool.io/cluster-id:
    Manager:         Go-http-client
    Operation:       Update
    Time:            2021-04-12T12:39:21Z
  Resource Version:  2241
  Self Link:         /apis/tarantool.io/v1alpha1/namespaces/tarantool/clusters/examples-kv-cluster
  UID:               ad41cc6a-d47d-4100-bbaa-454913b6b922
Spec:
  Selector:
    Match Labels:
      tarantool.io/cluster-id:  examples-kv-cluster
Events:                         <none>

All pods are running:

$ kubectl get -A pods
NAMESPACE            NAME                                         READY   STATUS      RESTARTS   AGE
ingress-nginx        ingress-nginx-admission-create-lmxbg         0/1     Completed   0          28m
ingress-nginx        ingress-nginx-admission-patch-svff5          0/1     Completed   0          28m
ingress-nginx        ingress-nginx-controller-77758b5777-vzhlq    1/1     Running     0          28m
kube-system          coredns-f9fd979d6-svvz5                      1/1     Running     0          29m
kube-system          coredns-f9fd979d6-z2q97                      1/1     Running     0          29m
kube-system          etcd-kind-control-plane                      1/1     Running     0          29m
kube-system          kindnet-h689g                                1/1     Running     0          29m
kube-system          kube-apiserver-kind-control-plane            1/1     Running     0          29m
kube-system          kube-controller-manager-kind-control-plane   1/1     Running     0          29m
kube-system          kube-proxy-tqv5l                             1/1     Running     0          29m
kube-system          kube-scheduler-kind-control-plane            1/1     Running     0          29m
local-path-storage   local-path-provisioner-78776bfc44-lfbsd      1/1     Running     0          29m
tarantool            routers-0-0                                  1/1     Running     0          19m
tarantool            storage-0-0                                  1/1     Running     0          19m
tarantool            storage-0-1                                  1/1     Running     0          17m
tarantool            tarantool-operator-66f4586bb5-v9j49          1/1     Running     0          22m

My cluster configuration:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP

Hello!
It is not clear what exactly the 404 returns. Cluster is not available to you via http?
Can you execute port-forward to some Tarantool pod and get into the cartridge web-ui? (how to do this can be found at the end of this doc section).

It is not clear what exactly the 404 returns. Cluster is not available to you via http?

As I understand the ingress controller should route my requests to the app via 80 port

But this request returns 404:

curl -XPOST http://localhost/kv -d '{"key":"key_1", "value": "value_1"}'

Can you execute port-forward to some Tarantool pod and get into the cartridge web-ui? (how to do this can be found at the end of this doc section).

After doing this I got into the cartridge web ui by URL http://localhost:8081/admin/cluster/dashboard

Now I can put and get values

$ curl -XPOST http://localhost:8081/kv -d '{"key":"key_1", "value": "value_1"}'
{"info":"Successfully created"}

Thanks for the help. It seems quite unclear from the doc that you must do the port forwarding