Skip to content

Instantly share code, notes, and snippets.

View arush-sal's full-sized avatar
🏍️
riding

Arush Salil arush-sal

🏍️
riding
View GitHub Profile
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: foo.bar.com
http:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-cert-manager-ingress
namespace: test-cert-manager-namespace
spec:
rules:
- host: ingress.kubernauts.sh
http:
paths:
apiVersion: certmanager.k8s.io/v1alpha1
kind: Issuer
metadata:
name: test-cert-manager-issuer
namespace: test-cert-manager-namespace
spec:
acme:
email: <Your-Email-Addess>
http01: {}
privateKeySecretRef:
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
name: test-cert-manager-certificate
namespace: test-cert-manager-namespace
spec:
acme:
config:
- domains:
- cert-manager.kubernauts.sh
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
certmanager.k8s.io/issuer: test-cert-manager-issuer
name: test-cert-manager-ingress
namespace: test-cert-manager-namespace
spec:
rules:
- host: cert-manager.kubernauts.sh
image: golang:latest
variables:
# Please edit to your GitLab project
REPO_NAME: gitlab.com/namespace/project
# The problem is that to be able to use go get, one needs to put
# the repository in the $GOPATH. So for example if your gitlab domain
# is gitlab.com, and that your repository is namespace/project, and
# the default GOPATH being /go, then you'd need to have your
@arush-sal
arush-sal / create-kube-user.sh
Created September 9, 2019 09:53 — forked from henning/create-kube-user.sh
create k8s user, certificate, permissions and client config
#!/bin/bash
CLUSTERNAME=mycluster.mydomain
NAMESPACE=default
USERNAME=myclusteruser
GROUPNAME=mygroup
openssl genrsa -out ${USERNAME}.key 2048
CSR_FILE=$USERNAME.csr
@arush-sal
arush-sal / main.go
Created February 28, 2020 10:06
Simple Gorilla Mux HTTP server with each request logged in Go lang
package main
import (
"fmt"
"log"
"net/http"
"net/http/httptest"
"net/http/httputil"
"github.com/gorilla/mux"
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"profiles":
@arush-sal
arush-sal / metric-server-v3.6.0
Created July 1, 2020 02:35
metric-server-v3.6.0
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:aggregated-metrics-reader
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules: