Notes & How-To Guides

This section contains technical notes, tips, and how-to guides on various topics including Linux and container technologies.

Categories

Container Technologies
Linux Administration
Concepts & Thoughts
  • Defms - A Distributed, Encrypted and Free Mail System

Quick Reference

# Merge kubeconfig files
KUBECONFIG=~/.kube/config:~/new-cluster-config kubectl config view --flatten > ~/.kube/merged-config
export KUBECONFIG=~/.kube/merged-config

# Set console banner
oc patch consoles.operator.openshift.io cluster --patch '{"spec":{"customization":{"customLogoFile":"","customProductName":"","customBannerText":"This is a test environment"}}}' --type=merge
apiVersion: kubevirt.io/v1
kind: VirtualMachine
spec:
  template:
    spec:
      domain:
        devices:
          disks:
          - name: containerdisk
            disk:
              bus: virtio
          - name: cloudinitdisk
            disk:
              bus: virtio
# Run a container
podman run -d --name web -p 8080:80 nginx

# List containers
podman ps

# Build from Dockerfile
podman build -t myapp .

# Generate systemd unit file
podman generate systemd --name mycontainer > ~/.config/systemd/user/mycontainer.service

Complete Notes Index