bynr / k8s-playground Goto Github PK
View Code? Open in Web Editor NEWPersonal playground with k8s
Personal playground with k8s
# Mounts local data directory to /data-fixtures in all nodes (for testing)"
k3d cluster create \
--wait \
--verbose \
--port 5000:80@loadbalancer \
--volume /home/circleci/project/data:/data-fixtures@all \
test-cluster
DEBU[0000] Selected runtime is 'docker.Docker'
DEBU[0000] API-Port Mapping didn't specify hostPort, choosing one randomly...
DEBU[0000] Got free port for API: '35293'
DEBU[0000] PortFilterMap: map[5000:80:[loadbalancer]]
WARN[0000] Node filter 'all' set, but more were specified in '[all]'
DEBU[0000] '--update-default-kubeconfig set: enabling wait-for-server
INFO[0000] Created network 'k3d-test-cluster'
INFO[0000] Created volume 'k3d-test-cluster-images'
INFO[0001] Creating node 'k3d-test-cluster-server-0'
DEBU[0001] Creating node from spec
&{Name:k3d-test-cluster-server-0 Role:server Image:docker.io/rancher/k3s:v1.18.6-k3s1 Volumes:[/home/circleci/project/data:/data-fixtures k3d-test-cluster-images:/k3d/images] Env:[K3S_TOKEN=bDMfwvMzdGiuiBBpUTre] Cmd:[] Args:[] Ports:[] Restart:false Labels:map[k3d.cluster:test-cluster k3d.cluster.imageVolume:k3d-test-cluster-images k3d.cluster.network:f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0 k3d.cluster.network.external:false k3d.cluster.token:bDMfwvMzdGiuiBBpUTre k3d.cluster.url:https://k3d-test-cluster-server-0:6443] Network:f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0 ServerOpts:{IsInit:false ExposeAPI:{Host:0.0.0.0 HostIP:0.0.0.0 Port:35293}} AgentOpts:{}}
DEBU[0001] Volumes: [/home/circleci/project/data:/data-fixtures k3d-test-cluster-images:/k3d/images]
DEBU[0002] Creating docker container with translated config
&{ContainerConfig:{Hostname:k3d-test-cluster-server-0 Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[] Tty:false OpenStdin:false StdinOnce:false Env:[K3S_TOKEN=bDMfwvMzdGiuiBBpUTre K3S_KUBECONFIG_OUTPUT=/output/kubeconfig.yaml] Cmd:[server --tls-san 0.0.0.0] Healthcheck:<nil> ArgsEscaped:false Image:docker.io/rancher/k3s:v1.18.6-k3s1 Volumes:map[] WorkingDir: Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[app:k3d k3d.cluster:test-cluster k3d.cluster.imageVolume:k3d-test-cluster-images k3d.cluster.network:f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0 k3d.cluster.network.external:false k3d.cluster.token:bDMfwvMzdGiuiBBpUTre k3d.cluster.url:https://k3d-test-cluster-server-0:6443 k3d.role:server k3d.server.api.host:0.0.0.0 k3d.server.api.hostIP:0.0.0.0 k3d.server.api.port:35293] StopSignal: StopTimeout:<nil> Shell:[]} HostConfig:{Binds:[/home/circleci/project/data:/data-fixtures k3d-test-cluster-images:/k3d/images] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode: PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] CapAdd:[] CapDrop:[] Capabilities:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:true PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[/run: /var/run:] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: ConsoleSize:[0 0] Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:<nil> OomKillDisable:<nil> PidsLimit:<nil> Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[] MaskedPaths:[] ReadonlyPaths:[] Init:0xc000260180} NetworkingConfig:{EndpointsConfig:map[f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0:0xc0001e0180]}}
INFO[0003] Pulling image 'docker.io/rancher/k3s:v1.18.6-k3s1'
{"status":"Pulling from rancher/k3s","id":"v1.18.6-k3s1"}
{"status":"Pulling fs layer","progressDetail":{},"id":"d08af7a2f8e1"}
{"status":"Pulling fs layer","progressDetail":{},"id":"e36263ed7f5a"}
{"status":"Pulling fs layer","progressDetail":{},"id":"3902f7c5e1da"}
{"status":"Download complete","progressDetail":{},"id":"e36263ed7f5a"}
{"status":"Verifying Checksum","progressDetail":{},"id":"3902f7c5e1da"}
{"status":"Download complete","progressDetail":{},"id":"3902f7c5e1da"}
{"status":"Downloading","progressDetail":{"current":506330,"total":50371027},"progress":"[\u003e ] 506.3kB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Downloading","progressDetail":{"current":8137178,"total":50371027},"progress":"[========\u003e ] 8.137MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Downloading","progressDetail":{"current":17795546,"total":50371027},"progress":"[=================\u003e ] 17.8MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Downloading","progressDetail":{"current":26982874,"total":50371027},"progress":"[==========================\u003e ] 26.98MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Downloading","progressDetail":{"current":37161434,"total":50371027},"progress":"[====================================\u003e ] 37.16MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Downloading","progressDetail":{"current":45337050,"total":50371027},"progress":"[=============================================\u003e ] 45.34MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Verifying Checksum","progressDetail":{},"id":"d08af7a2f8e1"}
{"status":"Download complete","progressDetail":{},"id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":524288,"total":50371027},"progress":"[\u003e ] 524.3kB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":2621440,"total":50371027},"progress":"[==\u003e ] 2.621MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":4718592,"total":50371027},"progress":"[====\u003e ] 4.719MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":6815744,"total":50371027},"progress":"[======\u003e ] 6.816MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":8912896,"total":50371027},"progress":"[========\u003e ] 8.913MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":11010048,"total":50371027},"progress":"[==========\u003e ] 11.01MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":13107200,"total":50371027},"progress":"[=============\u003e ] 13.11MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":15204352,"total":50371027},"progress":"[===============\u003e ] 15.2MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":17301504,"total":50371027},"progress":"[=================\u003e ] 17.3MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":19398656,"total":50371027},"progress":"[===================\u003e ] 19.4MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":21495808,"total":50371027},"progress":"[=====================\u003e ] 21.5MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":23592960,"total":50371027},"progress":"[=======================\u003e ] 23.59MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":25690112,"total":50371027},"progress":"[=========================\u003e ] 25.69MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":27787264,"total":50371027},"progress":"[===========================\u003e ] 27.79MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":29884416,"total":50371027},"progress":"[=============================\u003e ] 29.88MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":31981568,"total":50371027},"progress":"[===============================\u003e ] 31.98MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":34078720,"total":50371027},"progress":"[=================================\u003e ] 34.08MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":36175872,"total":50371027},"progress":"[===================================\u003e ] 36.18MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":38273024,"total":50371027},"progress":"[=====================================\u003e ] 38.27MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":40370176,"total":50371027},"progress":"[========================================\u003e ] 40.37MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":42467328,"total":50371027},"progress":"[==========================================\u003e ] 42.47MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":44564480,"total":50371027},"progress":"[============================================\u003e ] 44.56MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":46661632,"total":50371027},"progress":"[==============================================\u003e ] 46.66MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":48758784,"total":50371027},"progress":"[================================================\u003e ] 48.76MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":50371027,"total":50371027},"progress":"[==================================================\u003e] 50.37MB/50.37MB","id":"d08af7a2f8e1"}
{"status":"Pull complete","progressDetail":{},"id":"d08af7a2f8e1"}
{"status":"Extracting","progressDetail":{"current":153,"total":153},"progress":"[==================================================\u003e] 153B/153B","id":"e36263ed7f5a"}
{"status":"Extracting","progressDetail":{"current":153,"total":153},"progress":"[==================================================\u003e] 153B/153B","id":"e36263ed7f5a"}
{"status":"Pull complete","progressDetail":{},"id":"e36263ed7f5a"}
{"status":"Extracting","progressDetail":{"current":92,"total":92},"progress":"[==================================================\u003e] 92B/92B","id":"3902f7c5e1da"}
{"status":"Extracting","progressDetail":{"current":92,"total":92},"progress":"[==================================================\u003e] 92B/92B","id":"3902f7c5e1da"}
{"status":"Pull complete","progressDetail":{},"id":"3902f7c5e1da"}
{"status":"Digest: sha256:a835d76608a2503af8b681bb5888499d7c3456902f6853c8c1031f4a884715ca"}
{"status":"Status: Downloaded newer image for rancher/k3s:v1.18.6-k3s1"}
DEBU[0007] Created container 3a7e9e0d0bcebc01cb5562747206b4e3d7afd5758a386e56fd986767e917b36f
DEBU[0008] Created node 'k3d-test-cluster-server-0'
DEBU[0008] Node NAME: k3d-test-cluster-server-0
INFO[0008] Creating LoadBalancer 'k3d-test-cluster-serverlb'
DEBU[0008] Creating node from spec
&{Name:k3d-test-cluster-serverlb Role:loadbalancer Image:docker.io/rancher/k3d-proxy:v3.0.0 Volumes:[] Env:[SERVERS=k3d-test-cluster-server-0 PORTS=6443,80] Cmd:[] Args:[] Ports:[5000:80 0.0.0.0:35293:6443/tcp] Restart:false Labels:map[app:k3d k3d.cluster:test-cluster] Network:f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0 ServerOpts:{IsInit:false ExposeAPI:{Host: HostIP: Port:}} AgentOpts:{}}
DEBU[0008] Volumes: []
DEBU[0008] Starting to wait for server node 'k3d-test-cluster-server-0'
ERRO[0008] Failed waiting for log message 'Wrote kubeconfig' from node 'k3d-test-cluster-server-0'
DEBU[0008] Creating docker container with translated config
&{ContainerConfig:{Hostname:k3d-test-cluster-serverlb Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[6443/tcp:{} 80/tcp:{}] Tty:false OpenStdin:false StdinOnce:false Env:[SERVERS=k3d-test-cluster-server-0 PORTS=6443,80 K3S_KUBECONFIG_OUTPUT=/output/kubeconfig.yaml] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:docker.io/rancher/k3d-proxy:v3.0.0 Volumes:map[] WorkingDir: Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[app:k3d k3d.cluster:test-cluster k3d.role:loadbalancer] StopSignal: StopTimeout:<nil> Shell:[]} HostConfig:{Binds:[] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode: PortBindings:map[6443/tcp:[{HostIP:0.0.0.0 HostPort:35293}] 80/tcp:[{HostIP: HostPort:5000}]] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] CapAdd:[] CapDrop:[] Capabilities:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:true PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[/run: /var/run:] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: ConsoleSize:[0 0] Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:<nil> OomKillDisable:<nil> PidsLimit:<nil> Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[] MaskedPaths:[] ReadonlyPaths:[] Init:0xc000038850} NetworkingConfig:{EndpointsConfig:map[f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0:0xc0001e0840]}}
DEBU[0008] FIXME: Got an status-code for which error does not match any expected type!!!: -1 module=api status_code=-1
ERRO[0008] Failed to create container 'k3d-test-cluster-serverlb'
ERRO[0008] Failed to create node 'k3d-test-cluster-serverlb'
ERRO[0008] Failed to create loadbalancer
ERRO[0008] error during connect: Post "https://35.226.241.135:2376/v1.24/containers/create?name=k3d-test-cluster-serverlb": context canceled
ERRO[0008] Failed to create cluster >>> Rolling Back
INFO[0008] Deleting cluster 'test-cluster'
DEBU[0008] Cluster Details: &{Name:test-cluster Network:{Name:f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0 External:false} Token:bDMfwvMzdGiuiBBpUTre Nodes:[0xc00020c5a0 0xc000424240] InitNode:<nil> ExternalDatastore:{Endpoint: CAFile: CertFile: KeyFile: Network:} CreateClusterOpts:0xc00033d680 ExposeAPI:{Host:0.0.0.0 HostIP:0.0.0.0 Port:35293} ServerLoadBalancer:0xc00020c480 ImageVolume:}
INFO[0008] Deleted k3d-test-cluster-server-0
ERRO[0009] Failed to delete container 'k3d-test-cluster-serverlb'
WARN[0009] Failed to delete node 'k3d-test-cluster-serverlb': Try to delete it manually
INFO[0009] Deleting cluster network 'f327f415c0375f13b0fc996f040abf0ba89be503a029ecef0d8147758412bbd0'
ERRO[0009] Failed to delete 1 nodes: Try to delete them manually
FATA[0009] Cluster creation FAILED, also FAILED to rollback changes!
make: *** [Makefile:21: create_cluster] Error 1
Exited with code exit status 2
CircleCI received exit code 2
The README does not include enough emojis (in fact, none at all! ๐จ ๐ฑ ๐คฏ ).
Without emojis, how can you convey the joyful emotions that the word "playground" suggest?
Please fix asap ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.