Use these kubeadm configs and watch the live stream for more information on how to set up Kubernetes 1.17 on AWS with Cilium and Falco.
Kubeadm config
#!/usr/bin/env bash | |
NODE=kind-control-plane | |
IMG="docker.io/library/alpine" | |
POD="nsenter-$(tr -dc a-z0-9 < /dev/urandom | head -c 6)" | |
OVERRIDE="{\"spec\":{\"nodeName\":\"$NODE\",\"hostPID\":true,\"containers\":[{\"securityContext\":{\"privileged\":true},\"image\":\"${IMG}\",\"name\":\"nsenter\",\"stdin\":true,\"stdinOnce\":true,\"tty\":true,\"command\":[\"nsenter\",\"--target\",\"1\",\"--mount\",\"--uts\",\"--ipc\",\"--net\",\"--pid\",\"--\",\"bash\",\"-l\"]}]}}" | |
kubectl run --rm \ | |
--image "${IMG}" \ | |
--overrides="${OVERRIDE}" \ |
# Apply the metallb manifests to Kubernetes | |
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.8.1/manifests/metallb.yaml | |
# Apply a metallb configuration to Kubernetes | |
cat <<EOF | kubectl apply -f - | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
namespace: metallb-system | |
name: config |
# This tells kubecfg to read its config from the local directory | |
export KUBECONFIG=./kubeconfig | |
# Looking at the cluster | |
kubectl get nodes | |
kubectl get pods --namespace=kube-system | |
# Running a single pod | |
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard | |
kubectl get pods |
#!/bin/sh | |
# | |
# Just run this command (usage notes below): | |
pbpaste | xxd -r - FILENAME.EXT | |
# Script: restore_file_from_chrome_cache | |
# Author: Louis Rawlins ([email protected]) | |
# Date: November 17, 2016 at 4:35:39 PM PST | |
# Description: Restore cache files from hex generated by Chrome (chrome://cache) |
// compile with: gcc -static -o sendfd sendfd.c | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <sys/un.h> | |
#include <strings.h> | |
int send_fd(int sock, int fd){ | |
// This function does the arcane magic for sending | |
// file descriptors over unix domain sockets | |
struct msghdr msg; |
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }
#!/usr/bin/python | |
# Modified by Travis Lee | |
# Last Updated: 4/21/14 | |
# Version 1.16 | |
# | |
# -changed output to display text only instead of hexdump and made it easier to read | |
# -added option to specify number of times to connect to server (to get more data) | |
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc... | |
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port) |
#!/usr/bin/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |