warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

Nginx (proxy) Docker container

Create required directories
mkdir -p /etc/docker/nginx/{conf.d,html}

Configure nginx as webserver
cat < /etc/docker/nginx/conf.d/default.conf
server {
listen 80;
server_name _;

root /usr/share/nginx/html;
index index.html index.htm;

Configure nginx as proxy
cat < /etc/docker/nginx/conf.d/proxy.conf
server {
listen 80;

location / {
proxy_pass http://localhost:8080/;

Create container


kubectl Cheat Sheet

Dump Kubernetes Objects
kubectl get componentstatuses
kubectl get configmaps
kubectl get daemonsets
kubectl get deployments
kubectl get events
kubectl get endpoints
kubectl get horizontalpodautoscalers
kubectl get ingress
kubectl get jobs
kubectl get limitranges
kubectl get nodes
kubectl get namespaces
kubectl get pods
kubectl get pods --all-namespaces -o wide
kubectl get persistentvolumes
kubectl get persistentvolumeclaims
kubectl get quota

LXD: Create container with profile (connect to VLAN)

create profile
lxc profile copy default mgmt-dev
# lxc profile list
lxc profile device set mgmt-dev eth0 nictype macvlan
lxc profile device set mgmt-dev eth0 parent mgmt-dev-v4432
lxc profile show mgmt-dev

create container with profile
lxc launch ubuntu:18.04 bionic-mgmt-dev -p mgmt-dev
lxc ls

Enable container nesting
lxc config set bionic-mgmt-dev security.nesting true

Configure IP
cat < /var/lib/lxd/containers/bionic-mgmt-dev/rootfs/etc/netplan/50-cloud-init.yaml
version: 2


wget -q --no-check-certificate -O - | bash -


# install required packages
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

# install Docker repository key
curl -fsSL | sudo apt-key add -

# add Docker repository
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"

# update package list
sudo apt-get update

# install Docker
sudo apt-get install -y docker-ce

Syndicate content