Thursday, March 22, 2018

Yii2 mongo db group by count example

$collection = Yii::$app->mongodb->getCollection('collectionname');

        $callingstationidCount = $collection->aggregate([
            array('$group' => array(
                    '_id' => '$columnname',
                    'count' => array('$sum' => 1)
                ))
                ]
        );

Kubernetes in one shotcat

root@srv509172:~# cat kind1/config.yaml   kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane   image: kindest/nod...