Skip to content

Instantly share code, notes, and snippets.

View amalkh5's full-sized avatar

Amal Alkhamees amalkh5

View GitHub Profile

How to install Kative with Gloo on minikube

prerequisite

  1. kubectl
  2. minikube
  3. glooctl

Step 1: Create k8s cluster

  1. Move the default yum repository to another folder
mv /etc/yum.repos.d/*.repo /tmp/
  1. Create and edit a new config file
sudo nano /etc/yum.repos.d/remote.repo
  1. Add the following in the file
@amalkh5
amalkh5 / How to dockerize react app
Last active March 13, 2020 20:40
How to dockerize react app
NODE_PATH=src/
REACT_APP_API_URL=
@amalkh5
amalkh5 / openfaas.md
Last active March 11, 2020 11:55
How to install openfaas on k8s using helm

How to install openfaas on k8s using helm

  1. Create namespace for openfaas system and functions kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml
  2. Create the password for the openfaas user
password=$(head -c 12 /dev/urandom | shasum | cut -d' ' -f1)
kubectl -n openfaas create secret generic basic-auth \
--from-literal=basic-auth-user=admin \
--from-literal=basic-auth-password=$password  
@amalkh5
amalkh5 / docker.md
Last active March 11, 2020 10:44
docker cheatsheet

Docker Cheat Sheet

This cheat sheet provides a collection of important and uncommon docker commands that i need time from time.

Commands

start docker compose then rm the image

$ docker-compose up && docker-compose rm -fsv

remove all images with none

@amalkh5
amalkh5 / k8s.md
Last active January 17, 2020 10:06
k8s cheat sheet

Cluster configuration

      $ kubectl config set-cluster "$CLUSTER_NAME" --server="$SERVER_IP" --certificate-authority="$KUBE_CA_PEM"  --embed-certs=true
      $ kubectl config set-credentials "$KUBE_USER" --client-certificate="$CLIENT_CERT"  --client-key="$CLIENT_KEY"  --embed-certs=true
      $ kubectl config set-context "$KUBE_CONTEXT" --cluster="$CLUSTER_NAME" --user="$KUBE_USER" --namespace="$KUBE_NAMESPACE"
      $ kubectl config use-context "$KUBE_CONTEXT"

Set the KUBECONFIG environment variable

Create the formula

brew create  https://github.com/xxxxx/xxxxx/archive/v1.0.0.tar.gz

update the file under /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/xxxx.rb

brew install   --dubging  --build-from-source  /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/xxxx.rb

Installation

  1. Install the repository RPM
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  1. Install the client packages
yum install postgresql11`

Git Cheat Sheet

This cheatsheet provides a collection of common git commands.

Commands

add remote

$ git remote add name url