Instantly share code, notes, and snippets.

View etcd-op.md

On coco2

$ export ETCDCTL_API=3
$ export CA=/etc/etcd/ssl
$ etcdctl --write-out=table  --cacert=${CA}/etcd-ca.pem     --cert=${CA}/etcd.pem     --key=${CA}/etcd-key.pem --endpoints=100.67.151.2:2379 member list
+------------------+---------+-------+---------------------------+---------------------------+
|        ID        | STATUS  | NAME  |        PEER ADDRS         |       CLIENT ADDRS        |
+------------------+---------+-------+---------------------------+---------------------------+
| 23a97cc01374ffea | started | coco4 | https://100.67.151.4:2380 | https://100.67.151.4:2379 |
View IPVS-keepalived
http://kubernetes.kansea.com/docs/user-guide/services/#proxy-mode-userspace
https://jimmysong.io/kubernetes-handbook/concepts/service.html
https://github.com/kubernetes/kubernetes/tree/master/pkg/proxy/ipvs
https://jimmysong.io/posts/accessing-kubernetes-pods-from-outside-of-the-cluster/
https://github.com/kubernetes/contrib/tree/master/keepalived-vip
https://feisky.gitbooks.io/kubernetes/zh/plugins/keepalived-vip.html
https://www.nctusam.com/2017/09/08/kubernetes-keepailved-vip/
https://kubernetes.feisky.xyz/cha-jian-kuo-zhan/ingress/keepalived-vip
View mytest.json
{
"addresses":[
{
"address":"10.246.1.3/24",
"gateway":"10.246.1.1"
}
],
"routes":[
{
"dst":"0.0.0.0/0"
View k8s-kubeadm-install.sh
sudo kubeadm reset
sudo swapoff -a
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.9.1/Documentation/kube-flannel.yml
kubectl taint nodes --all node-role.kubernetes.io/master-
View Install NVIDIA Driver and CUDA.md
View container-registry-list.md

Services to securely store your Docker images.

  • Amazon EC2 Container Registry Amazon EC2 Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images.
  • Atomic Registry - Red Hat Atomic Registry is an open source enterprise registry based on the Origin and Cockpit projects, enhancing the Docker registry library.
  • Azure Container Registry Manage a Docker private registry as a first-class Azure resource
  • CargoOS A bare essential OS for running the Docker Engine on bare metal or Cloud.
  • Cycle.io Bare-metal container hosting.
  • Docker Hub provided by Docker Inc.
  • Docker Registry v2 - The Docker toolset to pack, ship, store, and deliver content
View CORD_build_script.sh
#!/bin/sh
curl -o ~/cord-bootstrap.sh https://raw.githubusercontent.com/opencord/cord/cord-5.0/scripts/cord-bootstrap.sh
chmod +x cord-bootstrap.sh
./cord-bootstrap.sh -d
export VAGRANT_SERVER_URL="https://vagrantcloud.com"
logout
login
time bash ./cord-bootstrap.sh -v -x -t "PODCONFIG=rcord-controlkube.yml config" \
-t "build" | tee -a ~/setup.log
View cssobj_git_diff.json
{
- "name": "cssobj",
- "description": "Runtime CSS manager, Turn CSS into dynamic JS module, Stylesheet CRUD (Create, Read, Update, Delete) in CSSOM, Solve com
mon problems of CSS-in-JS, name space (local) class names, media query hook for IE8, styled components",
- "filename": "cssobj.min.js",
- "keywords": [
- "cssom",
- "prefixer",
- "css generate",
- "diff css",