This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check file descriptor | |
$ ulimit -n | |
1024 | |
$ nano /etc/security/limits.conf | |
* soft nofile 64000 | |
* hard nofile 64000 | |
root soft nofile 64000 | |
root hard nofile 64000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run following command | |
``` | |
vboxmanage controlvm minikube setlinkstate1 off | |
vboxmanage controlvm minikube setlinkstate1 on | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: myapp-pod | |
labels: | |
app: myapp | |
spec: | |
containers: | |
- name: myapp-container | |
image: busybox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"mapping": { | |
"dynamic_templates": [ | |
{ | |
"product_objects": { | |
"path_match": "product_summary.info.*", | |
"match_mapping_type": "object", | |
"mapping": { | |
"dynamic": "strict", | |
"properties": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -exou pipefail | |
helm init || true | |
kubectl create serviceaccount --namespace kube-system tiller | |
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller | |
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm | |
sudo systemctl enable libvirtd.service | |
sudo systemctl start libvirtd.service | |
sudo systemctl status libvirtd.service | |
sudo usermod -a -G libvirt $(whoami) | |
newgrp libvirt | |
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ | |
&& sudo install docker-machine-driver-kvm2 /usr/local/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Singleton](http://marcio.io/2015/07/singleton-pattern-in-go/) | |
[Memory management](https://go101.org/article/memory-block.html) | |
[Channel](https://medium.com/rungo/anatomy-of-channels-in-go-concurrency-in-go-1ec336086adb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mysql | |
spec: | |
ports: | |
- port: 3306 | |
selector: | |
app: mysql | |
clusterIP: None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemctl stop kubelet | |
systemctl stop docker | |
iptables --flush | |
iptables -tnat --flush | |
systemctl start kubelet | |
systemctl start docker |
NewerOlder