Skip to content

Instantly share code, notes, and snippets.

@arashkaffamanesh
arashkaffamanesh / readme.adoc
Created May 18, 2017 08:30 — forked from arun-gupta/readme.adoc
Kubernetes Cluster on AWS
  1. kops: https://github.com/kubernetes/kops

    1. Getting Started Guide: https://github.com/kubernetes/kops/blob/master/docs/aws.md

    2. Installing Kubernetes on AWS with kops: https://kubernetes.io/docs/getting-started-guides/kops/

    3. Mulit-master Kubernetes Cluster on AWS with kops: http://blog.arungupta.me/multimaster-kubernetes-cluster-amazon-kops/

    4. Booting Kubernetes on Amazon Elastic Compute with kops: https://deis.com/docs/workflow/quickstart/provider/aws/boot/

    5. Setting up an HA Kubernetes Cluster in AWS with private topology with kops 1.5.1: https://www.nivenly.com/kops-1-5-1/

    6. Kubernetes on AWS: https://daemonza.github.io/2017/01/15/kubernetes-on-aws/

    7. Your 2nd day with Kubernetes on AWS: https://www.nivenly.com/2nd-hour/

  2. Tectonic (Terraform): http://github.com/coreos/tectonic-installer

@arashkaffamanesh
arashkaffamanesh / 1_kubernetes_on_macOS.md
Created March 18, 2018 19:34 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

My Openshift Cheatsheet

Install paks using yum in a Dockerfile

# Install Runtime Environment
RUN set -x && \ 2
    yum clean all && \
 REPOLIST=rhel-7-server-rpms,rhel-7-server-optional-rpms,rhel-7-server-thirdparty-oracle-java-rpms \
@arashkaffamanesh
arashkaffamanesh / helm-cheatsheet.md
Created November 26, 2018 12:43 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!
#!/bin/sh
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
apiVersion: v1
kind: Namespace
metadata:
name: rook-ceph-system
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cephclusters.ceph.rook.io
spec:
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler flanneld; do
	systemctl restart $SERVICES
	systemctl enable $SERVICES
	systemctl status $SERVICES
done

restart kubelet/node services

for SERVICES in kube-proxy kubelet flanneld docker; do

systemctl restart $SERVICES

@arashkaffamanesh
arashkaffamanesh / kubernetes-latest-image.md
Created April 19, 2019 21:43 — forked from BrandonPotter/kubernetes-latest-image.md
Force Kubernetes to pull latest container image in a deployment

Force Kubernetes to pull latest container image in a deployment

kubectl patch deployment DEPLOYMENT_NAME -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
@arashkaffamanesh
arashkaffamanesh / kafka1-cluster.yaml
Created April 25, 2019 11:35
kafka1-cluster.yaml
apiVersion: kafka.strimzi.io/v1alpha1
kind: Kafka
metadata:
name: kafka1
spec:
kafka:
version: 2.1.0
replicas: 3
listeners:
plain: {}
@arashkaffamanesh
arashkaffamanesh / kafka1-topic.yaml
Created April 25, 2019 12:03
kafka1-topic.yaml
apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaTopic
metadata:
name: test
labels:
strimzi.io/cluster: kafka1
spec:
partitions: 3
replicas: 3