Skip to content

Instantly share code, notes, and snippets.

View wu0407's full-sized avatar

wowqing wu0407

View GitHub Profile
@wu0407
wu0407 / 1-static-pod-delete-kubelet.log
Last active December 1, 2023 10:40
static pod delete process
I1123 14:18:35.558172 315900 kubelet.go:2124] "SyncLoop REMOVE" source="file" pods=[default/nginx-static-pod-10.11.251.2]
I1123 14:18:35.558191 315900 kubelet.go:1969] "Pod has been deleted and must be killed" pod="default/nginx-static-pod-10.11.251.2" podUID=a8712c005851ee6b29cff91b9ab4b9c6
I1123 14:18:35.558206 315900 pod_workers.go:638] "Pod is being removed by the kubelet, begin teardown" pod="default/nginx-static-pod-10.11.251.2" podUID=a8712c005851ee6b29cff91b9ab4b9c6
I1123 14:18:35.558234 315900 pod_workers.go:888] "Processing pod event" pod="default/nginx-static-pod-10.11.251.2" podUID=a8712c005851ee6b29cff91b9ab4b9c6 updateType=1
I1123 14:18:35.558244 315900 pod_workers.go:1005] "Pod worker has observed request to terminate" pod="default/nginx-static-pod-10.11.251.2" podUID=a8712c005851ee6b29cff91b9ab4b9c6
I1123 14:18:35.558259 315900 kubelet.go:1795] "syncTerminatingPod enter" pod="default/nginx-static-pod-10.11.251.2" podUID=a8712c005851ee6b29cff91b9ab4b9c6
I1123 14:18:35.558267 315900 kubel
@wu0407
wu0407 / mirror pod delete log in kubelet
Last active December 1, 2023 03:35
The process of mirror pod delete
I1123 14:11:15.664065 315900 config.go:278] "Setting pods for source" source="api"
I1123 14:11:15.664544 315900 kubelet.go:2130] "SyncLoop DELETE" source="api" pods=[default/nginx-static-pod-10.11.251.2]
I1123 14:11:15.664591 315900 pod_workers.go:888] "Processing pod event" pod="default/nginx-static-pod-10.11.251.2" podUID=a8712c005851ee6b29cff91b9ab4b9c6 updateType=0
I1123 14:11:15.664610 315900 kubelet.go:1554] "syncPod enter" pod="default/nginx-static-pod-10.11.251.2" podUID=a8712c005851ee6b29cff91b9ab4b9c6
I1123 14:11:15.664621 315900 kubelet_pods.go:1441] "Generating pod status" pod="default/nginx-static-pod-10.11.251.2"
I1123 14:11:15.664660 315900 kubelet_pods.go:1453] "Got phase for pod" pod="default/nginx-static-pod-10.11.251.2" oldPhase=Running phase=Running
I1123 14:11:15.664771 315900 status_manager.go:535] "Ignoring same status for pod" pod="default/nginx-static-pod-10.11.251.2" status={Phase:Running Conditions:[{Type:Initialized Status:True LastProbeTime:0001-01-01 00:00:00 +0000 UTC La
@wu0407
wu0407 / sandbox-not-cleanup.log
Created November 28, 2023 23:55
The kubelet did not clean up the sandbox log.
I0919 11:11:20.322601 190330 kubelet.go:2130] "SyncLoop DELETE" source="api" pods=[default/nginx-deployment-bd4476b48-fpgvc]
I0919 11:11:20.322631 190330 pod_workers.go:625] "Pod is marked for graceful deletion, begin teardown" pod="default/nginx-deployment-bd4476b48-fpgvc" podUID=95d6b80b-77f5-4218-824e-69eec4998c22
I0919 11:11:20.322658 190330 pod_workers.go:888] "Processing pod event" pod="default/nginx-deployment-bd4476b48-fpgvc" podUID=95d6b80b-77f5-4218-824e-69eec4998c22 updateType=1
I0919 11:11:20.322689 190330 pod_workers.go:1005] "Pod worker has observed request to terminate" pod="default/nginx-deployment-bd4476b48-fpgvc" podUID=95d6b80b-77f5-4218-824e-69eec4998c22
I0919 11:11:20.322700 190330 kubelet.go:1795] "syncTerminatingPod enter" pod="default/nginx-deployment-bd4476b48-fpgvc" podUID=95d6b80b-77f5-4218-824e-69eec4998c22
I0919 11:11:20.322710 190330 kubelet_pods.go:1441] "Generating pod status" pod="default/nginx-deployment-bd4476b48-fpgvc"
I0919 11:11:20.322755 190330 kubelet_pods.go:145
@wu0407
wu0407 / kubelet-pod-delete.log
Created November 27, 2023 06:44
The pod delete log in kubelet
I0731 17:16:31.865371 354472 kubelet.go:2130] "SyncLoop DELETE" source="api" pods=[default/test-nginx-976fbbd77-m2tqs]
I0731 17:16:31.865402 354472 pod_workers.go:625] "Pod is marked for graceful deletion, begin teardown" pod="default/test-nginx-976fbbd77-m2tqs" podUID=5011243d-6324-41e3-8ee8-9e8bb33f04b0
I0731 17:16:31.865427 354472 pod_workers.go:888] "Processing pod event" pod="default/test-nginx-976fbbd77-m2tqs" podUID=5011243d-6324-41e3-8ee8-9e8bb33f04b0 updateType=1
I0731 17:16:31.865457 354472 pod_workers.go:1005] "Pod worker has observed request to terminate" pod="default/test-nginx-976fbbd77-m2tqs" podUID=5011243d-6324-41e3-8ee8-9e8bb33f04b0
I0731 17:16:31.865468 354472 kubelet.go:1795] "syncTerminatingPod enter" pod="default/test-nginx-976fbbd77-m2tqs" podUID=5011243d-6324-41e3-8ee8-9e8bb33f04b0
I0731 17:16:31.865477 354472 kubelet_pods.go:1441] "Generating pod status" pod="default/test-nginx-976fbbd77-m2tqs"
I0731 17:16:31.865518 354472 kubelet_pods.go:1453] "Got phase for pod" pod="default/
@wu0407
wu0407 / hpa test.log
Last active November 29, 2023 00:05
hpa test scale speed record
ab压测时间
从13:10:00开始进行压测到13:10:11压测结束。
# date;ab -n 100000 -c 20 10.252.211.253/;date
Thu Nov 2 13:10:00 CST 2023
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.252.211.253 (be patient)
@wu0407
wu0407 / replace-coredns.yaml
Created September 7, 2023 03:18
ansible replace kuberentes cluster dns server ip
- name: replace coredns
gather_facts: false
hosts: coredns
tasks:
# echo "[coredns]" >> /tmp/coredns-host; kubectl get pod -n kube-system -l k8s-app=kube-dns --no-headers -o custom-columns=:spec.nodeName >> /tmp/coredns-host
# ansible-playbook -i /tmp/coredns-host replace-coredns.yaml
- name: detect docker container runtime
stat:
path: /var/run/dockershim.sock
register: docker_stat
@wu0407
wu0407 / example_output.txt
Created August 4, 2016 07:59 — forked from JustinCarmony/example_output.txt
Summary Salt Highstate Outputter
root@deployServer:~# salt \* state.highstate --output=summary_highstate
web-server01.example.com ------------------ Success: 20 Changed: 0 Errors: 0
web-server02.example.com ------------------ Success: 71 Changed: 1 Errors: 0
db-server03.example.com ------------------- Success: 73 Changed: 1 Errors: 0
mongo-server04.example.com ---------------- Success: 74 Changed: 1 Errors: 0
mongo-server05.example.com ---------------- Success: 74 Changed: 1 Errors: 0
memcache-server06.example.com ------------- Success: 74 Changed: 1 Errors: 0
mysql-server07.example.com ---------------- Success: 74 Changed: 1 Errors: 0
logs-server08.example.com ----------------- Success: 20 Changed: 0 Errors: 0
redis-server09.example.com ---------------- Success: 27 Changed: 0 Errors: 0