Skip to content

Instantly share code, notes, and snippets.

Guangyou Yu guangyouyu

Block or report user

Report or block guangyouyu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View stress-k8s.py
from kubernetes import client, config
import time
deployment_name = 'ddd'
def scale_deployment(api_instance, namespace, name, replicas, scale):
scale.spec.replicas = replicas
result = api_instance.patch_namespaced_deployment(namespace='default', name=name, body=scale)
def read_deployment_available(api_instance, namespace, name):
@guangyouyu
guangyouyu / goroutine-detail
Last active May 1, 2018
thread apply all bt
View goroutine-detail
(gdb) goroutine 17 bt
#0 runtime.goexit () at /opt/go/src/runtime/asm_amd64.s:2198
#1 0x0000000000000000 in ?? ()
(gdb) goroutine 2 bt
#0 runtime.gopark (unlockf={void (struct runtime.g *, void *, bool *)} 0xc42004e768, lock=0x543d510 <runtime.forcegc>,
reason="force gc (idle)", traceEv=20 '\024', traceskip=1) at /opt/go/src/runtime/proc.go:272
#1 0x000000000042f1be in runtime.goparkunlock (lock=0x543d510 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024',
traceskip=1) at /opt/go/src/runtime/proc.go:277
#2 0x000000000042eede in runtime.forcegchelper () at /opt/go/src/runtime/proc.go:226
#3 0x000000000045c531 in runtime.goexit () at /opt/go/src/runtime/asm_amd64.s:2197
View master.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kube-controller-manager
namespace: {{ CLUSTER_NAME }}
spec:
replicas: 1
template:
spec:
containers:
You can’t perform that action at this time.