Skip to content

Instantly share code, notes, and snippets.

View orcunuso's full-sized avatar

Ozan Orcunus orcunuso

View GitHub Profile

My Cheat Sheet Related with Containers

As my daily routine highly includes Docker, Kubernetes and OpenShift, I thought that it would be a good idea to prepare and publish a cheat sheet for myself and also for anyone who might find this useful. So let's start with some aliases.

alias dockerauth='cat $HOME/.docker/config.json'
alias dockerps='docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Command}}" --no-trunc'
alias ocsource='source <(oc completion bash)'
alias ocnodelistpods='oc adm manage-node --list-pods'
alias ocnodemaintenanceon='oc adm manage-node --schedulable=false'
@orcunuso
orcunuso / occlusterup.sh
Last active February 24, 2021 13:19
Minimal OpenShift cluster
#!/bin/bash
# Before start, please check that sysctl net.ipv4.ip_forward is set to 1.
# Install yum packages
yum install -y vim curl net-tools bash-completion yum-utils lsof
# Install Docker latest. yum-utils package is required (which provides the yum-config-manager
# utility) in order to set up the docker stable repository. After install, we need to define
# docker network as insecure registry to prevent failure during cluster creation.
@orcunuso
orcunuso / 01-crd-cka.yaml
Last active October 31, 2019 08:21
CustomResourceDefinition CKA
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: certifications.k8s.orcunuso.io
spec:
additionalPrinterColumns:
- name: Owner
description: Owner of the certification
JSONPath: .spec.owner
type: string