Checking the status of the platform

Once all previous steps have been completed and all components have been installed, it is necessary to make sure that each individual process taking part in the deployment is running.

TBC E·xplcar qué es un namespace

$ kubectl get namespaces
NAME              STATUS   AGE
default           Active   291d
kube-node-lease   Active   291d
kube-public       Active   291d
kube-system       Active   291d
monitoring        Active   291d

The “default” namespace will be named accordingly to the “namespace” variable value that you have given in the Ansible main.yml configuration step.

On a kubernetes based deployment, these processes correspond with pods running inside the kubernetes cluster. Pods are the smallest, most basic deployable objects in Kubernetes. A pod represents a single instance of a running process in your cluster. Pods contain one or more containers, such as Docker containers. When a pod runs multiple containers, the containers are managed as a single entity and share the pod’s resources.

To get the list of deployed pods, kubectl must be used. The kubectl command line tool lets you control a Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. From a technical point of view, kubectl is a client for the Kubernetes REST API. In our case, just run the following command into a terminal:

$ kubectl get pods

This should output something similar to this:

NAME                                          READY   STATUS    RESTARTS   AGE
audiomixer-sfu1-0                             1/1     Running   0          68d
database-mongo-0                              2/2     Running   0          92d
database-mongo-1                              2/2     Running   0          111d
database-mongo-2                              2/2     Running   0          92d
erebus-5f8c55769b-crwwr                       1/1     Running   0          26d
kapi-684c86965d-zqf9v                         2/2     Running   0          98d
keycloak-6d495fb676-kn7kf                     1/1     Running   0          48m
kitter-6578d796dc-fxskt                       1/1     Running   0          26d
manager-6bff5d6648-sjmtp                      1/1     Running   0          9d
message-broker-54c5bb76c7-w2qxt               1/1     Running   0          57d
mongodb-kubernetes-operator-7dc8f5548-bnf8n   1/1     Running   0          98d
nfs-client-provisioner-7c7bd78d56-q998g       1/1     Running   0          111d
postgresql-b647cbdb7-7ds2w                    1/1     Running   4          257d
qss-audiomixersio-sfu1-f8568dc66-p8vz5        1/1     Running   0          9d
qss-auth-http-6569b55f55-g5nm8                1/1     Running   0          9d
qss-calls-849dd98bbd-9rf84                    1/1     Running   0          9d
qss-calltransfer-basic-56df5df49b-cswgv       1/1     Running   0          9d
qss-conference-state-5b5559d7dd-q44br         1/1     Running   0          9d
qss-invites-rooms-694dfd58f-4lvp5             1/1     Running   0          9d
qss-io-websockets-85ccdf6f59-wwmxn            1/1     Running   0          9d
qss-log-conference-5975b7cd59-szgpv           1/1     Running   0          9d
qss-meeting-basic-85498f898-z8szn             1/1     Running   0          9d
qss-peer-jt-798bfb4d99-cn7w8                  1/1     Running   0          9d
qss-quick-conference-5bcbb56b69-clg82         1/1     Running   0          9d
qss-registry-authenticated-6cb856d6c9-6ftx7   1/1     Running   0          9d
qss-resolver-wac-5b757b57d6-rptdc             1/1     Running   0          9d
qss-rooms-basic-6d95bc7b58-84lh9              1/1     Running   0          9d
qss-trunk-7bd5c7c57f-tpl7h                    1/1     Running   0          9d
qss-watchdog-invites-5774f5bbd8-kn5pg         1/1     Running   0          9d
qss-watchdog-registry-768c764859-mqr4p        1/1     Running   0          9d
recording-7d6d44f66b-pqptt                    1/1     Running   0          54d
sfu-dispatcher-98d7ff946-99gct                1/1     Running   0          50d
sfu-wrapper-sfu1-cbc69865f-q24rj              1/1     Running   0          26d
sfu1-0                                        1/1     Running   1          42d
sip-proxy-1-0                                 1/1     Running   0          91d
sip-proxy-database-8dd96bccf-lfkdq            1/1     Running   0          91d
sippo-server-d668c8656-c86wg                  1/1     Running   0          9d
sippo-storage-bdfcdf9c9-tsjhz                 1/1     Running   0          110d
sippo-storage-bdfcdf9c9-wql7h                 1/1     Running   0          98d
webphone-angular-6977498bc-lg7gd              1/1     Running   0          9d
webphone-matrix-d9f459787-h5wd4               1/1     Running   0          9d
xmpp-server-69d6b87678-8l2sw                  2/2     Running   0          62d

On this list you should be able to see at least one pod per role configured in the ansible script and all pods should have the STATUS column set to Running. If some element is missing you should consider restarting the installation process making sure all steps have been followed correctly.

If one or more pods have a status different from Running this means those services have encountered an error. To to show details of a specific pod and related resources, on a terminal, run the following command:

$ kubectl describe pod <name-of-the-pod>

The following is an example output for a describe of a sippo-server pod:

Name:           sippo-server-6b7c6f7684-lsxp5
Namespace:      poc
Priority:       0
Start Time:     Thu, 26 Dec 2019 11:13:21 +0100
Labels:         app=sippo-server
Annotations:    <none>
Status:         Running
IPs:            <none>
Controlled By:  ReplicaSet/sippo-server-6b7c6f7684
    Container ID:   docker://dddc63acfc156b252af7958601f6245bfd27f43f744ab003d792d5794b2ef015
    Image ID:       docker-pullable://
    Ports:          8000/TCP, 5678/TCP
    Host Ports:     0/TCP, 0/TCP
    State:          Running
    Started:      Thu, 26 Dec 2019 11:14:34 +0100
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    /home/nfs/filesharing from kube-nfs-pvc-filesharing (rw)

Type              Status
Initialized       True
Ready             True
ContainersReady   True
PodScheduled      True
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      wac-config
    Optional:  false

QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations: for 300s
       for 300s
Events:          <none>

Also the following command can be executed to show the logs for the selected pod:

$ kubectl logs <name-of-the-pod> --tail 50 -f

An example of the output for this command is as follows:

Thu Jan 02 2020 23:57:02 GMT+0000 (UTC) [761cf75f-4ddc-40dc-beea-ffc8bc23c08e~hr4VcVoYQIEToJSBAAIf~5e0e625ecc8296cb78101f79~5dc5775c5b8a2934b2e39704#node@sippo-server-6b7c6f7684-xxqwh<1>:/wac/lib/core/io/wapi/Wapi.js] debug: onWAPIMessage 877551, /sessions/5e0e625ecc8296cb78101f79, PUT
Thu Jan 02 2020 23:57:02 GMT+0000 (UTC) [node@sippo-server-6b7c6f7684-lsxp5<1>:/wac/lib/core/Sessions.js] debug: 5dc5775c5b8a2934b2e39704,  update session 5e0e625ecc8296cb78101f79
Thu Jan 02 2020 23:57:02 GMT+0000 (UTC) [761cf75f-4ddc-40dc-beea-ffc8bc23c08e~hr4VcVoYQIEToJSBAAIf~5e0e625ecc8296cb78101f79~5dc5775c5b8a2934b2e39704#node@sippo-server-6b7c6f7684-xxqwh<1>:/wac/lib/core/io/wapi/Wapi.js] debug: onWAPIMessageResponse 877551, /sessions/5e0e625ecc8296cb78101f79, PUT
Thu Jan 02 2020 23:57:13 GMT+0000 (UTC) [node@sippo-server-6b7c6f7684-lsxp5<1>:/wac/lib/core/io/wapi/Wapi.js] debug: client disconnection with session id 5e0e625ecc8296cb78101f79
Fri Jan 03 2020 00:00:49 GMT+0000 (UTC) [node@sippo-server-6b7c6f7684-lsxp5<1>:/wac/lib/core/Sessions.js] debug: Remove session due expiration, [ '5e0e625ecc8296cb78101f79' ]
Fri Jan 03 2020 00:00:49 GMT+0000 (UTC) [node@sippo-server-6b7c6f7684-lsxp5<1>:/wac/lib/services/UserSettings.js] debug: disconnected