Closed opskumu closed 1 year ago
SUSE 官方一系列关于 CPU 隔离的文章,推荐阅读,包括 isolcpus 和 cpuset 相关都有说明
$ kubectl exec -it sa-example -- /bin/sh
# export CURL_CA_BUNDLE=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
# TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
# curl -H "Authorization: Bearer $TOKEN" https://kubernetes/api/v1/namespaces/default/pods
{
"kind": "PodList",
"apiVersion": "v1",
"metadata": {
"selfLink": "/api/v1/namespaces/default/pods",
"resourceVersion": "10377013"
},
"items": [
{
"metadata": {
"name": "sa-example",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/pods/sa-example",
"uid": "c969fb72-ad72-4111-a9f1-0a8b148e4a3f",
"resourceVersion": "10362903",
"creationTimestamp": "2020-07-15T06:19:26Z"
},
"spec": {
...
更快捷的方式
token=`kubectl get secret <secret> -o yaml -n <namespace> |grep "token:" |awk '{print $2}'|base64 -d`
curl -k -H "Authorization: Bearer $token" https://127.0.0.1:8443/api/v1/pods
# bridge fdb show dev flannel.1
92:f3:c8:b2:6e:f0 dst 10.100.139.246 self permanent
ba:10:0e:7b:74:89 dst 10.100.139.247 self permanent
判断类似 calico/flannel vxlan 对应网络
say bye 2022
2022 占个位