Cordon all nodes.
for i in $(kubectl get nodes | grep ip |awk '{print $1}'); do kubectl cordon $i; done
// LiquidCrystal_I2C.h: https://github.com/johnrickman/LiquidCrystal_I2C | |
#include <Wire.h> // Library for I2C communication | |
#include <LiquidCrystal_I2C.h> // Library for LCD using I2C Adapter | |
#include <Firmata.h> | |
// Wiring: SDA pin is connected to A4 and SCL pin to A5. | |
// Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered) | |
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2); // Change to (0x27,20,4) for 20x4 LCD. | |
int lastLine = 1; |
aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/ZXXXX" | jq -r '.ResourceRecordSets[] | [.Name,.TTL,.Type,(.ResourceRecords[]?|.Value),.AliasTarget.DNSName?] | @tsv' > output.tsv |
Cordon all nodes.
for i in $(kubectl get nodes | grep ip |awk '{print $1}'); do kubectl cordon $i; done
self.output = CfnOutput(self, "Ec2DetailedMonitoringMitigationArn", | |
value=self.function.function_arn, | |
export_name='Ec2DetailedMonitoringMitigationArn') |
source_info = {"owner":"spensireli","repository":"ssm-test","path":"ssm-test","tokenInfo":"{{ssm-secure:git-token}}", "getOptions":"branch:main"} | |
json_encoded_source_info = json.dumps(source_info) | |
try: | |
send_command = ssm_client.send_command( | |
InstanceIds=[resource_id], | |
DocumentName="AWS-ApplyAnsiblePlaybooks", | |
Parameters={"SourceType": ["GitHub"], "SourceInfo": [json_encoded_source_info], "PlaybookFile": ["someteam.yml"], "InstallDependencies": ["True"]} | |
) |
mkdir /target/directory | |
cd /source/directory | |
tar -cvf - . | (cd /target/directory && tar xvf -) |
PUT /_cluster/settings | |
{ | |
"index.mapping.total_fields.limit": 3000 | |
} |
# Flash the esp8266 from my m2 macbook | |
esptool.py --port /dev/cu.usbserial-0001 --baud 460800 write_flash --flash_size=detect -fm dout 0 ~/Downloads/esp8266-20220618-v1.19.1.bin | |
# Connect via serial with rshell | |
rshell -p /dev/cu.usbserial-0001 |
# Stop Daemonset (apply node selector) | |
kubectl -n <namespace> patch daemonset <name-of-daemon-set> -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}' | |
# Start Daemonset (remove node selector) | |
kubectl -n <namespace> patch daemonset <name-of-daemon-set> --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]' |
for grant_id in $(aws kms list-grants --key-id <key-id> --query 'Grants[].GrantId' --output text); do aws kms revoke-grant --key-id <key-id> --grant-id $grant_id; done |