Skip to content

Instantly share code, notes, and snippets.

View jtfogarty's full-sized avatar

Jeff Fogarty jtfogarty

View GitHub Profile
@jtfogarty
jtfogarty / v1.sh
Last active February 19, 2022 02:48
CertificateSigningRequest
#!/bin/bash
# SERVICE=vault-server-tls
SERVICE=vault-svc
# NAMESPACE where the Vault service is running.
NAMESPACE=vault
# SECRET_NAME to create in the Kubernetes secrets store.
SECRET_NAME=vault-server-tls
@jtfogarty
jtfogarty / create-user.sh
Created February 12, 2021 21:51
Create User
#!/bin/bash
#
# Create Kubernetes user. Require cfssl.
#
# Usage:
# ./create-user.sh <kubernetes api host> <fulle name> <clusterrole>
#
# Example:
# ./create-user.sh k8s-api.my-domain.com "Jane Doe" my-project:admin
@jtfogarty
jtfogarty / tldr.sh
Last active October 30, 2020 17:39
Jenkins-x 3 install
curl -L https://github.com/jenkins-x/jx-cli/releases/download/v3.0.633/jx-cli-linux-amd64.tar.gz | tar xzv
sudo mv jx /usr/local/bin
jx upgrade cli
jx upgrade plugins
#git clone forked jx repo
#cd into repo
vi jx-requirements.yml\
# Chagne ingress
# jx upgrade plugins #dup
# jx gitops upgrade. #no need to upgrade gitops on a fresh install
@jtfogarty
jtfogarty / master.sh
Last active April 16, 2023 03:35
Installing k8s on ubuntu
#!/bin/bash
if [ $# -eq 0 ]
then
echo "No Arguments Supplied"
echo "Arg Options are: remove or install"
exit
fi
if [ $1 != 'install' ]
then
rm -rf /var/lib/rook
@jtfogarty
jtfogarty / metal-LB.yaml
Created October 23, 2020 20:07
pfSense - OpenBGPD - MetalLB
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
config: |
peers:
- peer-address: 10.10.100.2
peer-asn: 64512
@jtfogarty
jtfogarty / PV.yaml
Last active October 14, 2020 22:34
CKA Storage Example
kind: PersistentVolume
apiVersion: v1
metadata:
name: lab6-pv-volume
labels:
type: local
spec:
capacity:
storage: 2Gi
accessModes:
@jtfogarty
jtfogarty / Dockerfile
Last active October 25, 2020 23:28
Octant on k8s cluster
FROM alpine:3.12
RUN apk add --no-cache curl
WORKDIR /tmp/plug
RUN mkdir -p /root/.config/octant/plugins
RUN curl -L https://github.com/jenkins-x/octant-jx/releases/download/v0.0.27/octant-jx-linux-amd64.tar.gz | tar xzv
RUN mv octant-* /root/.config/octant/plugins
WORKDIR /tmp/oct
RUN curl -L https://github.com/vmware-tanzu/octant/releases/download/v0.16.1/octant_0.16.1_Linux-64bit.tar.gz | tar xzv
RUN mv ./octant_0.16.1_Linux-64bit/octant /root/
WORKDIR /root
# Copied from the Jupter Development Team.
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
ARG BASE_CONTAINER=jupyter/minimal-notebook
FROM $BASE_CONTAINER
LABEL maintainer="whosoever will"
USER root
1. sudo useradd -m -s /bin/bash neovim #linux only of course
2. sudo su - neovim
3. neovim
- Linux
- wget https://github.com/neovim/neovim/releases/download/v0.4.3/nvim-linux64.tar.gz
- tar -xzvf nvim-linux64.tar.gz
- rm nvim-linux64.tar.gz
- OS X
kfctl version
gcloud config list
gcloud config set compute/zone us-central1-a
gcloud config list
PROJECT_ID=$(gcloud config list project --format='value(core.project)')
echo ""
read -p "Enter the name of this cluster: " KF_NAME
echo "$KF_NAME!"
export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.0-branch/kfdef/kfctl_gcp_iap.v1.0.1.yaml"
export CLIENT_ID=