Skip to content

Instantly share code, notes, and snippets.

View sttts's full-sized avatar

Dr. Stefan Schimanski sttts

View GitHub Profile
@sttts
sttts / conformance.log
Last active November 27, 2015 17:01
Kubernetes conformance v1.1.1 test result against v0.7.0-v1.1.1 Mesos/Docker cluster (https://github.com/mesosphere/kubernetes/releases/tag/v0.7.0-v1.1.1)
Build 'OSS :: Kubernetes Mesos :: 5 - Conformance Tests' #768
Started 'Fri Nov 27 16:00:14 UTC 2015' on 'EC2-i-4d9265fb-1' by 'Stefan Schimanski (sttts)'
Finished 'Fri Nov 27 16:42:06 UTC 2015' with status 'NORMAL Tests passed: 72, ignored: 102'
TeamCity URL https://teamcity.mesosphere.io/viewLog.html?buildId=82134&buildTypeId=Oss_KubernetesMesos_ConformanceTests
TeamCity server version is 9.1.4 (build 37293)
[16:00:12]i: TeamCity server version is 9.1.4 (build 37293)
[16:00:12]W: bt377 (41m:53s)
[16:00:13] : Collecting changes in 1 VCS root
[16:00:13] : [Collecting changes in 1 VCS root] VCS Root details
@sttts
sttts / install-latest-docker.bash
Created March 31, 2016 10:28
Install latest docker in CoreOS stable
mkdir -p /etc/systemd/system/docker.service.d
cat > /etc/systemd/system/docker.service.d/10-docker-latest.conf <<EOF
[Service]
ExecStartPre=/bin/bash -ec "test -f /var/lib/docker-latest || /usr/bin/curl -L -o /var/lib/docker-latest https://get.docker.com/builds/Linux/x86_64/docker-latest && /usr/bin/chmod +x /var/lib/docker-latest"
ExecStart=
ExecStart=/var/lib/docker-latest daemon --host=fd:// $DOCKER_OPTS $DOCKER_OPT_BIP $DOCKER_OPT_MTU $DOCKER_OPT_IPMASQ
EOF
cat > /etc/systemd/system/usr-bin-docker.mount <<EOF
[Unit]
{
"id": "/local-persist",
"instances": 2,
"cpus": 1,
"mem": 128,
"container": {
"type": "DOCKER",
"docker": {
"image": "cwspear/docker-local-persist-volume-plugin",
"network": "HOST",
@sttts
sttts / node-recovery.md
Last active July 19, 2016 13:26
Recovering a node from a backup using https://github.com/coreos/etcd/pull/5397

Work in Progress

Recovery Procedure

Start with a running cluster (a 1-node cluster is enough) with lots of data, e.g.:

$ etcd --name 0 --listen-peer-urls=http://localhost:2380 --listen-client-urls=http://localhost:2379 -advertise-client-urls=http://localhost:2379 --initial-cluster-state=new --snapshot-count=100 --debug=true --log-package-levels "*=DEBUG"

Prerequisites

Recovery Procedure

Start with a running cluster (a 1-node cluster is enough), e.g.:

apiVersion: v1
kind: Pod
metadata:
name: sysctl
annotations:
security.alpha.kubernetes.io/sysctls: kernel.shm_rmid_forced=1
spec:
containers:
- name: sysctl
image: busybox
apiVersion: v1
kind: Pod
metadata:
name: invalid-sysctl
annotations:
security.alpha.kubernetes.io/sysctls: kernel.msgmax=1234567
spec:
containers:
- name: sysctl
image: busybox
GOROOT=/Users/sts/.bin/go-1.8.3
GOPATH=/Users/sts/Quellen/kubernetes
/Users/sts/.bin/go-1.8.3/bin/go test -c -o /private/var/folders/gg/zn9yfdld21j7xg5jnj5zz5d80000gn/T/All_in__k8s_io_kubernetes_pkg_api_go k8s.io/kubernetes/pkg/api
/private/var/folders/gg/zn9yfdld21j7xg5jnj5zz5d80000gn/T/All_in__k8s_io_kubernetes_pkg_api_go -test.v
meta_test.go:98: authorization.k8s.io/v1, Kind=ListOptions (v1.ListOptions) does not implement ListMetaAccessor or ObjectMetaAccessor
meta_test.go:98: authorization.k8s.io/v1, Kind=ExportOptions (v1.ExportOptions) does not implement ListMetaAccessor or ObjectMetaAccessor
meta_test.go:98: authorization.k8s.io/v1, Kind=GetOptions (v1.GetOptions) does not implement ListMetaAccessor or ObjectMetaAccessor
meta_test.go:98: authorization.k8s.io/v1, Kind=DeleteOptions (v1.DeleteOptions) does not implement ListMetaAccessor or ObjectMetaAccessor
meta_test.go:98: authorization.k8s.io/v1, Kind=WatchEvent (v1.WatchEvent) does not implement ListMetaAccessor or ObjectMetaAccessor
meta_test.
// Register registers a plugin
func Register(plugins *admission.Plugins) {
plugins.Register("LimitPodHardAntiAffinityTopology", func(config io.Reader) (admission.Interface, error) {
return NewInterPodAntiAffinity(), nil
})
}
// plugin contains the client used by the admission controller
type plugin struct {
*admission.Handler
image.DockerImage -> dockerpre012.ImagePre012
image.Image -> v1.Image
v1.ListMeta -> v1.ListMeta
*int64 -> int
intstr.IntOrString -> intstr.IntOrString
*int32 -> int32
runtime.RawExtension -> runtime.Object
map[string]image.TagEventList -> []v1.NamedTagEventList
image.ImageStreamSpec -> v1.ImageStreamSpec
v1.ImageStreamStatus -> image.ImageStreamStatus