- You should have docker-compose installed. If you don't have it, get it from [docker/compose][docker-compose] release page.
- Get the [docker-compose.yml][docker-compose.yml]
- Go to command line / terminal
- Go to directory containing
docker-compose.yml
. Generally it will be Downloads directory - Run docker compose and dertach
docker-compose up -d
This file contains hidden or 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
foo |
This file contains hidden or 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
" Install minimal vimrc using: | |
" wget -q https://yogendra.me/minimal-vimrc -O ~/.vimrc | |
let g:netrw_liststyle=3 | |
set autoindent | |
set cursorcolumn | |
set cursorline | |
set expandtab | |
set history=50 | |
set hlsearch | |
set ignorecase |
This file contains hidden or 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
docker volume create mlab-mongo | |
docker container run --rm --name mlab-mongo --network-alias mlab-mongo -p 27017:27017 -v mlab-mongo-data:/data/db -d mongo | |
docker container run --rm --name mlab -p 5000:5000 -e VCAP_SERVICES='{"mlab": ["credentials": {"uri":"mongodb://mlab-mongo:27017/mlab"}]}' -v config.py:/usr/src/app/config.py cloudgeek007/devopspipeline:6 |
This file contains hidden or 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: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: allow-apps-egress-ent-svc | |
spec: | |
podSelector: {} | |
policyTypes: | |
- Egress | |
egress: | |
- to: |
When you use your own custom private registry, you may end up using your own private CA signed or self signed certificates. This will cause container runtime to complain about untrusted cert, etc.
Here is a simple code that can fix this for you.
kubectl apply -f https://gist.github.com/yogendra/9937ead35a4ceb6f58ab5c4dc181cec3/node-ca-updater-daemons.yaml
This file contains hidden or 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: ServiceAccount | |
metadata: | |
labels: | |
k8s-app: metrics-server | |
name: metrics-server | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole |
There are many instances that I need to do this. Especially if I am installing K8s in an internet restricted environment (example: [Install TKG in Internet restricted env][install-tkg-internet-restricted])
So I like to use [docker registry][docker-registry] and [mkcert][mkcert] to play with this scenario
-
Create directories for certs and data
mkdir -p data certs
This file contains hidden or 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
echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant | |
sed -i "s/^#UseDNS no/UseDNS no/g" /etc/ssh/sshd_config | |
curl -L https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub >> ~/.ssh/authorized_keys | |
apt update | |
apt install open-vm-tools -qqy | |
curl https://raw.githubusercontent.com/boxcutter/ubuntu/master/script/cleanup.sh | bash |