- command line values (for example, -u my_user, these are not variables)
- role defaults (defined in role/defaults/main.yml)
- inventory file or script group vars
- inventory group_vars/all
kubectl run nginx image=nginx --port=80 --record | |
kubectl set image deployment nginx nginx=nginx:1.2 | |
kubectl rollout history deployment nginx | |
kubectl rollout status deployment nginx | |
kubectl rollout undo deployment nginx --to-revision=2 | |
kubectl autoscale deployment nginx --cpu-percent=50 -- min=1 -- max 2 | |
kubectl run nginx3 --image=nginx --requests=cpu=200m --limits=cpu=300m --requests=memory=1Gi --limits=memory=2Gi | |
kubectl run hello --schedule=”*/1 * * * *” --restart=OnFailure -- image=busybox -- /bin/sh -c “date; echo Hello from the kubernetes cluster” | |
kubectl port-forward redis-master-765d459796–258hz 6379:6379 | |
kubectl get pods redis-master-765d459796–258hz -o yaml |
A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.
This is specific to k8s and containers that have CPU limits set.
To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:
sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /
Tuesday, February 25, 2020
Wednesday, May 27, 2020 - updated customer_churn.ipynb
for version 7.7.0
Monday, November 16, 2020 - updated for version 7.10 and eland 7.10b
Monday, September 20, 2021 - updated customer_churn.ipynb
for version 7.14
Monday, February 8, 2022 - updated customer_churn.ipynb
for version 8.0
Supporting material for ElasticON 2020 talk on detecting DGA activity.
Note, full model, configuration and details on how to deploy the model will shortly be available in https://github.com/elastic/detection-rules
dga_ElasticON_2020.ipynb
shows how the model was trained.
Supporting data files are available https://storage.googleapis.com/elastic-ml-public/elasticon_2020_dga/dga_ElasticON_2020.tar
The following is a quick guide on getting basic status LED functionality working with TrueNAS running on the UGREEN DXP4800 Plus. Theoretically, it should work on all models (with some small revisions to the script), but I only have a DXP4800 Plus. :)
This guide is for cron job that runs a script to update the LEDs every couple minutes, but I'm sure the following can be modified for blinky LEDs as well.