Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm deployment note includes faulty code #514

Closed
neischlah opened this issue Jun 21, 2023 · 1 comment · Fixed by #560
Closed

Helm deployment note includes faulty code #514

neischlah opened this issue Jun 21, 2023 · 1 comment · Fixed by #560
Assignees
Labels
bug Something isn't working

Comments

@neischlah
Copy link

Describe the bug

After running helm install, I get instructions on how to find the URLs of the planes:

1. Get the control plane URL by running these commands:

  export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services tx-plato)
  export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
  echo http://$NODE_IP:$NODE_PORT

2. Get the data plane URL by running these commands:

  export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=tractusx-connector,app.kubernetes.io/instance=tx-plato" -o jsonpath="{.items[0].metadata.name}")
  export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT

The first command fails because there's no service called tx-plato (probably needs to be tx-plato-controlplane?).
The second command fails because jsonpath is incompatible.

To Reproduce

  1. Follow the example
  2. Run the scripts printed in step 3 after running helm install

Screenshots/Error Messages

⬢ [Systemd] ❯   export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services tx-plato)
  export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
  echo http://$NODE_IP:$NODE_PORT
Error from server (NotFound): services "tx-plato" not found
http://192.168.65.4:
⬢ [Systemd] ❯   export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=tractusx-connector,app.kubernetes.io/instance=tx-plato" -o jsonpath="{.items[0].metadata.name}")
  export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
error: error executing jsonpath "{.items[0].metadata.name}": Error executing template: array index out of bounds: index 0, length 0. Printing more information for debugging the template:
        template was:
                {.items[0].metadata.name}
        object given to jsonpath engine was:
                map[string]interface {}{"apiVersion":"v1", "items":[]interface {}{}, "kind":"List", "metadata":map[string]interface {}{"resourceVersion":""}}


Visit http://127.0.0.1:8080 to use your application
error: TYPE/NAME and list of ports are required for port-forward
See 'kubectl port-forward -h' for help and examples

Additional Information

kubectl get all
NAME                                           READY   STATUS    RESTARTS        AGE
pod/daps-6dbd85dcf9-gcrkn                      1/1     Running   1 (6h26m ago)   26h
pod/plato-postgresql-0                         1/1     Running   0               24m
pod/plato-vault-0                              1/1     Running   0               24m
pod/sokrates-postgresql-0                      1/1     Running   1 (6h26m ago)   21h
pod/sokrates-vault-0                           1/1     Running   1 (6h26m ago)   21h
pod/tx-plato-controlplane-dff9dc4f6-2bz77      1/1     Running   2 (24m ago)     24m
pod/tx-plato-dataplane-795bb5f645-rz68v        1/1     Running   0               24m
pod/tx-sokrates-controlplane-dcb4f4644-wrxqw   1/1     Running   4 (6h26m ago)   21h
pod/tx-sokrates-dataplane-574fccc7cf-ktlgq     1/1     Running   1 (6h26m ago)   21h

NAME                               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                                     AGE
service/daps                       ClusterIP   10.98.244.99     <none>        4567/TCP                                                                                    26h
service/kubernetes                 ClusterIP   10.96.0.1        <none>        443/TCP                                                                                     26d
service/plato-postgresql           ClusterIP   10.106.136.59    <none>        5432/TCP                                                                                    24m
service/plato-postgresql-hl        ClusterIP   None             <none>        5432/TCP                                                                                    24m
service/plato-vault                ClusterIP   10.107.173.158   <none>        8200/TCP,8201/TCP                                                                           24m
service/plato-vault-internal       ClusterIP   None             <none>        8200/TCP,8201/TCP                                                                           24m
service/sokrates-postgresql        ClusterIP   10.98.5.54       <none>        5432/TCP                                                                                    21h
service/sokrates-postgresql-hl     ClusterIP   None             <none>        5432/TCP                                                                                    21h
service/sokrates-vault             ClusterIP   10.100.45.143    <none>        8200/TCP,8201/TCP                                                                           21h
service/sokrates-vault-internal    ClusterIP   None             <none>        8200/TCP,8201/TCP                                                                           21h
service/tx-plato-controlplane      NodePort    10.96.229.191    <none>        8080:30482/TCP,8083:30475/TCP,8081:31648/TCP,8084:32757/TCP,9090:32345/TCP,8085:32736/TCP   24m
service/tx-plato-dataplane         ClusterIP   10.103.253.179   <none>        8080/TCP,8083/TCP,8081/TCP,8085/TCP,9090/TCP,8186/TCP                                       24m
service/tx-sokrates-controlplane   NodePort    10.99.145.253    <none>        8080:30149/TCP,8083:31558/TCP,8081:30828/TCP,8084:30565/TCP,9090:31885/TCP,8085:30601/TCP   21h
service/tx-sokrates-dataplane      ClusterIP   10.101.210.230   <none>        8080/TCP,8083/TCP,8081/TCP,8085/TCP,9090/TCP,8186/TCP                                       21h

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/daps                       1/1     1            1           26h
deployment.apps/tx-plato-controlplane      1/1     1            1           24m
deployment.apps/tx-plato-dataplane         1/1     1            1           24m
deployment.apps/tx-sokrates-controlplane   1/1     1            1           21h
deployment.apps/tx-sokrates-dataplane      1/1     1            1           21h

NAME                                                 DESIRED   CURRENT   READY   AGE
replicaset.apps/daps-6dbd85dcf9                      1         1         1       26h
replicaset.apps/tx-plato-controlplane-dff9dc4f6      1         1         1       24m
replicaset.apps/tx-plato-dataplane-795bb5f645        1         1         1       24m
replicaset.apps/tx-sokrates-controlplane-dcb4f4644   1         1         1       21h
replicaset.apps/tx-sokrates-dataplane-574fccc7cf     1         1         1       21h

NAME                                   READY   AGE
statefulset.apps/plato-postgresql      1/1     24m
statefulset.apps/plato-vault           1/1     24m
statefulset.apps/sokrates-postgresql   1/1     21h
statefulset.apps/sokrates-vault        1/1     21h
```</details>
@neischlah neischlah added the bug Something isn't working label Jun 21, 2023
@paullatzelsperger
Copy link
Contributor

thanks for noticing this, we're happy to accept PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants