bash
as shell.kubectl
.
-
Go to the directory.
cd demo-programmability
-
Apply configuration.
source bin/config.sh
-
Start demo
k8s-start
-
Open Kibana the browser at
http://localhost:5601
. In Management > Saved Object import the JSONdemo-programmability/resources/context-broker/kibana/saved-objects-$elk_version.json
where $elk_version is the version of Elastic stack (at this moment: 6.8.1 or 7.0.1).
k8s-gen-apache -n <number of request per second>
Generate x requests per second.
k8s-gen-mysql -c <number of commands per second per user> -u <number of users>
Generate requests.
k8s-gen-synflood -n <number of requests per seconds>
Set the period to collect data by the agents.
-
Filebeat
k8s-period-filebeat -p deploy/apache - s <period>
E.g.:
k8s-period-filebeat -p deploy/apache -s 10s
-
Metricbeat
k8s-period-metricbeat -p deploy/mysql -m mysql -s <period>
E.g.:
k8s-period-metricbeat -p deploy/mysql -m mysql -s 10s
-
Cubebeat
k8s-period-cubebeat -p deploy/ssh-server -s <period>
E.g.:
k8s-period-cubebeat -p deploy/ssh-server -s 10s
-
Metricbeat
k8s-period-metricbeat -p deploy/apache -m system -s <period> k8s-period-metricbeat -p deploy/mysql -m system -s <period> k8s-period-metricbeat -p deploy/ssh-server -m system -s <period>
E.g.:
k8s-period-metricbeat -p deploy/apache -m system -s 10s k8s-period-metricbeat -p deploy/mysql -m system -s 10s k8s-period-metricbeat -p deploy/ssh-server -m system -s 10s
-
Update pods (works only if the pods are already create).
kubectl replace -f ./pod
-
Delete all pods instance (they will be recreated automatically by k8s)
kubectl delete pod -all -n guard-kube
-
Delete all pods (they will NOT be recreated automatically by k8s)
kubectl delete deployment -all -n guard-kube
-
Delete all configMaps
kubectl delete configmap -all -n guard-kube
-
Delete all services
kubectl delete service -all -n guard-kube
-
k8s
- shortcut forkubectl -n guard-kube
. -
k8s-get
- shortcut fork8s get -o wide
. -
k8s-desc
- shortcut fork8s describe pods
. -
k8s-log
- shortcut fork8s logs
. -
k8s-pod
- shortcut fork8s-get pods
. -
k8s-serv
- shortcut fork8s-get services
. -
k8s-map
- shortcut fork8s-get configmaps
. -
k8s-start
- Start the demo. -
k8s-frwd
-t - port forwarding for . Possible values: elastic, kibana.
-
k8s-period-filebeat
-p -s - sets the (e.g. 10s) forfilebeat
in . -
k8s-period-metricbeat
-p -m -s - sets the (e.g. 10s) for ofmetricbeat
in . -
k8s-period-cubebeat
-p -s - sets the (e.g. 10s) forcubebeat
in . -
k8s-period-filebeat
-p - gets the period (e.g. 10s) forfilebeat
in . -
k8s-period-metricbeat
-p -m - gets the period (e.g. 10s) for ofmetricbeat
in pod. -
k8s-period-cubebeat
-p - gets the period (e.g. 10s) forcubebeat
in .