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${ARCH}, and 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.go:389] Default route transits interface "enp0s3" I0217 07:28:13.

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–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运行环境。 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

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 $ cd /tmp $ wget # 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 #!/usr/bin/env bash docker login --username=wubigo docker images | grep v1.13 | awk '{ print $1 }' | sed --expression=s'/\///' | xargs -i -t docker tag{}:v1.13.3{}:v1.13.3 docker images |grep ""| awk '{ print $1 }'| sed --expression=s'/\/co1\///' | xargs -i -t docker push{}: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.