Skip to content

Instantly share code, notes, and snippets.

View yogendra's full-sized avatar

Yogendra Rampuria - Yogi yogendra

View GitHub Profile
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@yogendra
yogendra / README.md
Last active February 17, 2021 12:18 — forked from rhardt-pivotal/node-ca-updater-daemonset.yaml
add a trusted CA to all the worker nodes in a TKG cluster

Kubernetes - Private Registry

When you use your own custom private registry, you may end up using your own private CA signed or self signed certificates. This will cause container runtime to complain about untrusted cert, etc.

Here is a simple code that can fix this for you.

kubectl apply -f https://gist.github.com/yogendra/9937ead35a4ceb6f58ab5c4dc181cec3/node-ca-updater-daemons.yaml
@yogendra
yogendra / 1.README.md
Last active May 23, 2021 09:34
K8s Tools

Simple Ingress + TLS setup

  1. Update /etc/hosts to point web.corp.local to your ingress IP

    sudo echo "10.40.14.36 web.corp.local" >> /etc/hosts
    
  2. Create certs

    1. Create certificates
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-apps-egress-ent-svc
spec:
podSelector: {}
policyTypes:
- Egress
egress:
- to:
@yogendra
yogendra / scratch
Last active April 19, 2020 07:20
Scratc
docker volume create mlab-mongo
docker container run --rm --name mlab-mongo --network-alias mlab-mongo -p 27017:27017 -v mlab-mongo-data:/data/db -d mongo
docker container run --rm --name mlab -p 5000:5000 -e VCAP_SERVICES='{"mlab": ["credentials": {"uri":"mongodb://mlab-mongo:27017/mlab"}]}' -v config.py:/usr/src/app/config.py cloudgeek007/devopspipeline:6
@yogendra
yogendra / README.md
Last active August 21, 2023 09:24
Jenkins on Docker

Run Jenkins on Docker

(Option 1) Docker Compose way

  1. You should have docker-compose installed. If you don't have it, get it from [docker/compose][docker-compose] release page.
  2. Get the [docker-compose.yml][docker-compose.yml]
  3. Go to command line / terminal
  4. Go to directory containing docker-compose.yml. Generally it will be Downloads directory
  5. Run docker compose and dertach
    docker-compose up -d
@yogendra
yogendra / .vimrc
Last active May 23, 2021 09:41
Kubernetes Environment Helpers
" Install minimal vimrc using:
" wget -q https://yogendra.me/minimal-vimrc -O ~/.vimrc
let g:netrw_liststyle=3
set autoindent
set cursorcolumn
set cursorline
set expandtab
set history=50
set hlsearch
set ignorecase
@yogendra
yogendra / bumpme
Created July 20, 2019 14:08
Concourse Tutorial Gist
foo
@yogendra
yogendra / .editorconfig
Last active July 14, 2019 06:41
PCF - Automation
root = true
[*]
end_of_line = lf
insert_final_newline = true
# Matches multiple files with brace expansion notation
[*.{js,jsx,html,sass,md}]
charset = utf-8
indent_style = space
@yogendra
yogendra / values.yaml
Created July 10, 2019 22:08
Helm Jenkins
Master:
AdminUser: user
AdminPassword: user
InstallPlugins:
- kubernetes:1.12.0
- workflow-job:2.23
- workflow-aggregator:2.5
- credentials-binding:1.16
- git:3.9.1
- blueocean:1.7.1