IT

Blog on hugo way

Decide to gave hugo a shot after many years of being jekyll

kubeamd cheat sheet

version notes some only works on 1.13 kubeadm version: &version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-16T15:29:34Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"} Starting with Kubernetes 1.12, the K8S.gcr.io/kube-${ARCH}, K8S.gcr.io/etcd and K8S.gcr.io/pause images don’t require an -${ARCH} suffix get all Pending pods kubectl get pods --field-selector=status.phase=Pending images list kubeadm config images list -v 4 I0217 07:28:13.305268 14495 interface.go:384] Looking for default routes with IPv4 addresses I0217 07:28:13.307275 14495 interface.

Deep Learning with Python

On the other hand, convolution is most typically done with 3x3 windows and no stride (stride 1). MATPLOTLIB Matplot is a python library that help us to plot data. The easiest and basic plots are line, scatter and histogram plots. Line plot is better when x axis is time. Scatter is better when there is correlation between two variables Histogram is better when we need to see distribution of numerical data.

K8S Monitor

setup prometheus prepare pv for prometheus https://wubigo.com/post/2018-01-11-kubectlcheatsheet/#pvc–using-local-pv install helm install --name prometheus1 stable/prometheus --set server.persistentVolume.storageClass=local-hdd,alertmanager.enabled=false

Ubungu Chinese locale

/etc/default/locale update-locale LANG=zh_CN.UTF-8 # File generated by update-locale LANG="en_US.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LANGUAGE="zh_CN:en_US:en"

K8S网络基础

K8S网络基础 K8S简介 K8S是自动化部署和监控容器的容器编排和管理工具。各大云厂商和应用开发平台都提供基于K8S的容器服务。 如果觉得K8S托管服务不容易上手或者和本公司的业务场景不很匹配,现在也有很多工具帮助在自己的数据 中心或私有云平台搭建K8S运行环境。 Minikube kops kubeadm 如果你想搭建一个测试环境,请参考 从K8S源代码构建容器集群(支持最新稳定版V1.13.3) 一个脚步部署K8S Kubernetes主要构件: 主节点: 主要的功能包括管理工作节点集群,服务部署,服务发现,工作调度,负载均衡等。 工作节点: 应用负载执行单元。 服务规范: 无状态服务,有状态服务,守护进程服务,定时任务等。 K8S网络基础 K8S网络模型 每一个POD拥有独立的IP地址 任何两个POD之间都可以互相通信且不通过NAT 集群每个节点上的代理(KUBELET)可以和该节点上的所有POD通信 K8S网络模型从网络端口分配的角度为容器建立一个干净的,向后兼容的规范,极大的方便和简化应用从虚拟机往容器迁移的流程。 K8S解决的网络问题: 容器间通信问题: 由POD和localhost通信解决 POD间通信问题: 由CNI解决 POD和服务的通信问题: 由SERVICE解决 外部系统和SERVICE的通信问题: 由SERVICE解决

K8S local development setup from source code

Setup a local development environment from source code with kubeadm

cdn note

The main point of a Content Distribution Network (CDN) is to put the content as close to the end-user as possible, thereby reducing the Distance component of the Round Trip Time (RTT) and speeding up the request. Simply serving static content from a s# sub-domain for CDN. The advantages of serving content from such a sub-domain, however, are that The sub-domain can be a cookie-less domain If you use your cookies correctly (ie.

linux note

iptables规则配置 表与链 调用链顺序 检查内存 ram speed and type dmidecode sudo dmidecode --type memory # dmidecode 3.0 Getting SMBIOS data from sysfs. SMBIOS 2.6 present. Handle 0x003E, DMI type 17, 28 bytes Memory Device Array Handle: 0x003C Error Information Handle: Not Provided Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: 1 Locator: XMM1 Bank Locator: Not Specified Type: DDR3 Type Detail: Synchronous Speed: Unknown Manufacturer: JEDEC ID: Serial Number: Asset Tag: Not Specified Part Number: Rank: Unknown lshw sudo lshw -class memory memory:0 description: System Memory physical id: 3c slot: System board or motherboard *-bank:0 description: DIMM DDR3 Synchronous [empty] vendor: JEDEC ID: physical id: 0 slot: XMM1 *-bank:1 description: DIMM DDR3 Synchronous 1333 MHz (0.

Linux File System Read Write Performance Test

dstat $dstat -d -nt $dstat -nt $dstat -N eth2,eth3 pkstat sudo apt-get install pktstat sudo pktstat -i eth0 -nt nethogs sudo apt-get install nethogs sudo nethogs EPEL http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/ $ cd /tmp $ wget http://mirror-fpt-telecom.fpt.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm How do I use EPEL repo? Simply use the yum commands to search or install packages from EPEL repo: # yum search nethogs # yum update # yum --disablerepo="*" --enablerepo="epel" install nethogs System administrators responsible for handling Linux servers get confused at times when they are told to benchmark a file system’s performance.

shell script

push docker images to ali registry-mirrors https://cr.console.aliyun.com #!/usr/bin/env bash docker login --username=wubigo registry.cn-beijing.aliyuncs.com docker images | grep v1.13 | awk '{ print $1 }' | sed --expression=s'/K8S.gcr.io\///' | xargs -i -t docker tag K8S.gcr.io/{}:v1.13.3 registry.cn-beijing.aliyuncs.com/co1/{}:v1.13.3 docker images |grep "registry.cn-beijing.aliyuncs.com"| awk '{ print $1 }'| sed --expression=s'/registry.cn-beijing.aliyuncs.com\/co1\///' | xargs -i -t docker push registry.cn-beijing.aliyuncs.com/co1/{}:v1.13.3 docker push through cache #!/usr/bin/env bash if [ -z "$VM" ]; then VM = t1 echo "VAR VM is not set" exit fi tee daemon.

java notes

访问可见性 修饰符 类 包 子类 所有人 public 是 是 是 是 protected 是 是 是 否 没有修饰符 是 是 否 否 private 是 否 否 否 方法签名 方法签名包括 方法名 参数类型 参数顺序 不包括 返回类型 可见性 抛出例外 过载和覆盖 过载: 方法名称相同但签名不同 覆盖: 签名相同,而且返回类型也必须相同 可见性不能减少,可以增加可见性 例外必须相同或者是父类例外的子类 visibility and Atomicity in the absence of synchronization, there are a number of reasons a thread might not immediately ‐ or ever ‐ see the results of an operation in another thread.