Skip to content

Instantly share code, notes, and snippets.

@surajssd
surajssd / Vagrantfile
Last active July 26, 2020 04:39
kubernetes the hard way
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "master" do |master|
master.vm.box = "fedora/28-cloud-base"
master.vm.hostname = "master"
master.vm.network "private_network", ip: "192.168.50.10"
end
echo "
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: privileged
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
spec:
privileged: true
allowPrivilegeEscalation: true
#!/bin/bash
# ref: https://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel/
# ref: https://computingforgeeks.com/how-to-install-virtualbox-on-fedora-linux/
cd /etc/yum.repos.d/
curl -O https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
dnf update -y
dnf install -y binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
systemctl reboot
@surajssd
surajssd / README.md
Last active December 22, 2017 07:08
Libpod CPU profile

This has CPU Profile for Libpod

This file has been truncated, but you can view the full file.
-- Logs begin at Mon 2017-11-27 10:33:23 UTC, end at Mon 2017-11-27 12:08:42 UTC. --
Nov 27 10:33:23 minikube localkube[2900]: E1127 10:33:23.049158 2900 kuberuntime_container.go:356] getKubeletContainers failed: rpc error: code = Unknown desc = Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Nov 27 10:33:23 minikube localkube[2900]: E1127 10:33:23.049170 2900 kubelet.go:1212] Container garbage collection failed: rpc error: code = Unknown desc = Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Nov 27 10:33:23 minikube localkube[2900]: I1127 10:33:23.049315 2900 server.go:227] Event(v1.ObjectReference{Kind:"Node", Namespace:"", Name:"minikube", UID:"minikube", APIVersion:"", ResourceVersion:"", FieldPath:""}): type: 'Warning' reason: 'ContainerGCFailed' rpc error: code = Unknown desc = Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Nov 27 10:33:23 miniku

Download kedge for your operating system. And place above two files in single directory and run following:

$ kedge create -f kedge.yaml 
persistentvolumeclaim "orientdb-databases" created
persistentvolumeclaim "orientdb-backup" created
service "orientdbservice" created
deployment "orientdbservice" created
@surajssd
surajssd / deploy_opencompose.md
Last active November 13, 2016 13:00
OpenCompose services.yml

The services.yml file

$ cat services.yml 
version: "0.2"

services:
    frontend:
        image: docker.io/surajd/frontend:v1
        ports:
version: "2"
services:
hello:
image: surajd/hello
ports:
- "8080"
- "8778"
- "8443"
labels:
- "app=hello"
version: "2"
services:
hello:
image: surajd/hello
ports:
- "8080"
- "8778"
- "8443"
labels:
- "app=hello"
version: "2"
services:
postgres:
image: postgres:9.4
ports: ["5432"]
redis:
image: redis:alpine
ports: ["6379"]