Skip to content

Instantly share code, notes, and snippets.

@inevity
inevity / 1_kubernetes_on_macOS.md
Created June 13, 2018 06:58 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

## use the in-k8s register
```
make push
kc get pod
metallb-system controller-76bfc5b8f-gn67m 1/1 Running 0 7m 172.17.0.6 minikube
metallb-system controller-7cbddf6c7-75rr2 0/1 ImagePullBackOff 0 1m 172.17.0.4 minikube
metallb-system speaker-2n5vj 0/1 ImagePullBackOff 0 1m 10.0.2.15 minikube
metallb-system test-bgp-router-5d5b7ffdb7-skgqg 0/1 ImagePullBackOff 0 1m 172.17.0.7 minikube
metallb-system test-bgp-router-fd8d857bd-4fmw8 1/1 Running 0 7m 172.17.0.5 minikube

Zip excluding specific directories

Exclude .git file and node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/\*

Exclude .git file and files in node_modules directory, but keep node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\*
@inevity
inevity / openssh.ps1
Last active July 26, 2021 07:45 — forked from slardiere/openssh.ps1
Install OpenSSH on Windows
#need powershell 7 /wtf 5.1
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
}
$url = 'https://github.com/PowerShell/Win32-OpenSSH/releases/latest/'