Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Chandan Kumar chandankumar4

🎯
Focusing
Block or report user

Report or block chandankumar4

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chandankumar4
chandankumar4 / VagrantFile
Created Jul 11, 2018 — forked from yudaykiran/VagrantFile
VagrantFile for automating Kubernetes Setup
View VagrantFile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.6.0"
# K8s Master Nodes
M_NODES = ENV['M_NODES'] || 1
View Phoenix on Ubuntu.md

Installation of Phoenix on Ubuntu 16.04

  • Don't use the Ubuntu packages provided, instead:
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb 
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang elixir
View Gitlab_Aouth
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/cookiejar"
"net/url"
"strings"
View Postgres DB
# Install PostSql (Ubuntu)
sudo apt-get install postgresql postgresql-contrib
------------------------------------------------------------------------------------------------------------------
# Delete PostSql (Ubuntu)
dpkg -l | grep postgres
sudo apt-get remove --purge postgresql postgresql-9.5 postgresql-client-9.5 postgresql-client-common postgresql-common postgresql-contrib postgresql-contrib-9.5
rm -r /etc/postgresql/
View setup-kubeadm-on-vm.md
@chandankumar4
chandankumar4 / Useful commands.md
Last active May 26, 2019
Minikube and Docker
View Useful commands.md

Install minikube and Docker

sudo apt-get install docker.io
sudo usermod -a -G docker $USER
reboot

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl

chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
View metric-server.yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
View helm install
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
View local_config.go
package main
import (
"flag"
"fmt"
"k8s.io/client-go/kubernetes"
"os"
"path/filepath"
"runtime"
View ubuntu-package.sh
# update
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install curl -y
sudo apt-get install wget -y
# Install vs code
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
You can’t perform that action at this time.