>crt.cfg cat <<-EOF
RANDFILE = NV::HOME/.rnd
[ req ]
default_bits = 2048
default_keyfile = ca.key
HOSTNAME=`curl -s http://169.254.169.254/latest/meta-data/local-hostname` | |
SERVER=$1 | |
TOKEN=$2 | |
curl -s --insecure -k -v -H "Accept: application/json" -H "Authorization: Bearer $TOKEN" -XPATCH -d '{"spec":{"unschedulable":true}}' -H "Content-Type: application/merge-patch+json" $SERVER/api/v1/nodes/$HOSTNAME | |
for each in $(curl -s -k -H "Authorization: Bearer $TOKEN" --insecure -XGET $SERVER/api/v1/namespaces | jq -r '.items[].metadata.name'); | |
do arr=($(curl -s -k -H "Authorization: Bearer $TOKEN" --insecure -XGET $SERVER/api/v1/namespaces/$each/pods | jq --arg node $HOSTNAME -r '.items[] | select(.spec.nodeName == $node) | .metadata.name')); | |
for i in ${arr[@]}; |
Hopefully helped another k8s newbie with the following. The question was, how do you update a single key in a secret in k8s? I don't know anything about secrets but I will probably want to know this in the future, so here we go.
First, to create a dummy secret:
apiVersion: v1
kind: Secret
metadata:
name: test-secret
data:
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: filebeat | |
namespace: kube-system | |
labels: | |
k8s-app: filebeat | |
spec: | |
template: | |
metadata: |
Create React apps with no build configuration.
Thanks to create-react-app. It's saves a lot of my time. I remember several months ago I had to setup a lot just for a react app, webpack, babel, test environment and so on... Fortunately, everything becomes easy now. Though you have many choices of start boiler plate, you worth trying this.
If you are build a SPA with react, you probably use react-router
.
- Awesome ECS lost: https://github.com/nathanpeck/awesome-ecs#aws-fargate
- How to access KMS/SSM parameters from a Docker instance: https://aws.amazon.com/blogs/compute/managing-secrets-for-amazon-ecs-applications-using-parameter-store-and-iam-roles-for-tasks/
- Preventing HTTP 503 with transparent SSL: https://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy
- Fargate CLI: http://somanymachines.com/fargate/
- Mutliple fargate instaces with single ELB: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules
seleniumArgs = { | |
baseURL: 'https://selenium-release.storage.googleapis.com', | |
version: '2.48', | |
drivers: { | |
chrome: { | |
version: '2.25', | |
arch: process.arch, | |
baseURL: 'https://chromedriver.storage.googleapis.com' | |
}, | |
firefox: { |
var dns = require("dns"); | |
var http = require("http"); | |
var fs = require("fs"); | |
var net = require("net"); | |
dns.setServers(["127.0.0.1"]); | |
var makeCallLookup = function(cb) { | |
dns.lookup("testSlow.com", cb); | |
} |
This a collection of interesting links found in The Imposter's Handbook by Rob Conery.
Content: