Skip to content

Instantly share code, notes, and snippets.

View tamalsaha's full-sized avatar
🎢
Building. Learning. Improving.

Tamal Saha tamalsaha

🎢
Building. Learning. Improving.
View GitHub Profile
apiVersion: node.k8s.appscode.com/v1alpha1
kind: NodeTopology
metadata:
name: gke-n1-standard
spec:
nodeSelectionPolicy: Taint
topologyKey: nodepool_type
nodeGroups:
- allocatable:
cpu: 940m
I0206 08:58:12.504338 1 httplog.go:131] "HTTP" verb="POST" URI="/apis/meta.k8s.appscode.com/v1alpha1/renderdashboards" latency="30.132663ms" userAgent="b3/v0.0.0 (linux/amd64) kubernetes/$Format" audit-ID="f25e5b2f-9f7e-4fb5-9ffa-5346fb2af186" srcIP="10.2.4.1:6858" resp=500 statusStack=<
goroutine 165575 [running]:
k8s.io/apiserver/pkg/server/httplog.(*respLogger).recordStatus(0xc010f334a0, 0xc01250aa50?)
/src/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go:324 +0x90
k8s.io/apiserver/pkg/server/httplog.(*respLogger).WriteHeader(0xc010f334a0, 0xc01250e160?)
/src/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go:306 +0x25
k8s.io/apiserver/pkg/server/filters.(*baseTimeoutWriter).WriteHeader(0xc01250aa80, 0xac0000c0000a0400?)
/src/vendor/k8s.io/apiserver/pkg/server/filters/timeout.go:236 +0x1c8
k8s.io/apiserver/pkg/endpoints/metrics.(*ResponseWriterDelegator).WriteHeader(0x8?, 0xc00e20efa8?)
I0206 08:58:12.504338 1 httplog.go:131] "HTTP" verb="POST" URI="/apis/meta.k8s.appscode.com/v1alpha1/renderdashboards" latency="30.132663ms" userAgent="b3/v0.0.0 (linux/amd64) kubernetes/$Format" audit-ID="f25e5b2f-9f7e-4fb5-9ffa-5346fb2af186" srcIP="10.2.4.1:6858" resp=500 statusStack=<
goroutine 165575 [running]:
k8s.io/apiserver/pkg/server/httplog.(*respLogger).recordStatus(0xc010f334a0, 0xc01250aa50?)
/src/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go:324 +0x90
k8s.io/apiserver/pkg/server/httplog.(*respLogger).WriteHeader(0xc010f334a0, 0xc01250e160?)
/src/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go:306 +0x25
k8s.io/apiserver/pkg/server/filters.(*baseTimeoutWriter).WriteHeader(0xc01250aa80, 0xac0000c0000a0400?)
/src/vendor/k8s.io/apiserver/pkg/server/filters/timeout.go:236 +0x1c8
k8s.io/apiserver/pkg/endpoints/metrics.(*ResponseWriterDelegator).WriteHeader(0x8?, 0xc00e20efa8?)
#!/bin/bash
## This script downloads and generates a suitable ext4 image from existing cloud
## images. For simplicity it currently only downloads from Ubuntu images, but it
## should not be a big effort to adapt to other cloud images.
UBUNTU_VERSION=${1:-bionic}
IMAGE_SIZE=${2:-20G}
IMAGE_ROOTFS=images/$UBUNTU_VERSION/$UBUNTU_VERSION.rootfs
@tamalsaha
tamalsaha / tc mirroring.md
Created September 6, 2022 07:57 — forked from mcastelino/tc mirroring.md
Using tc redirect to connect a virtual machine to a container network

Connecting a veth device to tap

  • veth device from CNI/CNM plugin: eth0
  • tap device that connects to the VM: tap0

Redirecting traffic between the two devices

tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all u32 match u8 0 0 action mirred egress redirect dev tap0
@tamalsaha
tamalsaha / bigetc.go
Created May 12, 2022 06:08 — forked from c4pt0r/bigetc.go
bigetc.go
package bigetc
import (
"database/sql"
"time"
"github.com/c4pt0r/log"
_ "github.com/go-sql-driver/mysql"
)
tamal@m1 ~/g/s/k/installer (pb-version)> helm upgrade -i kubedb-catalog appscode/kubedb-catalog -n kubedb --create-namespace \
--set catalog.elasticsearch=false \
--set catalog.etcd=false \
--set catalog.memcached=false \
--set catalog.mongodb=false \
--set catalog.mysql=false \
--set catalog.mariadb=false \
--set catalog.perconaxtradb=false \
--set catalog.postgres=false \
--set catalog.proxysql=false \
# HELP kube_certificatesigningrequest_annotations Kubernetes annotations converted to Prometheus labels.
# TYPE kube_certificatesigningrequest_annotations gauge
kube_certificatesigningrequest_annotations{certificatesigningrequest="csr-wx62v",signer_name="kubernetes.io/kube-apiserver-client-kubelet"} 1
# HELP kube_certificatesigningrequest_labels Kubernetes labels converted to Prometheus labels.
# TYPE kube_certificatesigningrequest_labels gauge
kube_certificatesigningrequest_labels{certificatesigningrequest="csr-wx62v",signer_name="kubernetes.io/kube-apiserver-client-kubelet"} 1
# HELP kube_certificatesigningrequest_created Unix creation timestamp
# TYPE kube_certificatesigningrequest_created gauge
kube_certificatesigningrequest_created{certificatesigningrequest="csr-wx62v",signer_name="kubernetes.io/kube-apiserver-client-kubelet"} 1.650622754e+09
# HELP kube_certificatesigningrequest_condition The number of each certificatesigningrequest condition
port: 4222
https: 8222
server_name: us-central-nats-demo
max_connections: 250000
max_subscriptions: 200000
reconnect_error_reports: 3600
max_traced_msg_len: 64