Skip to content

Instantly share code, notes, and snippets.

@kimschles
kimschles / namespace.yml
Created December 19, 2018 17:52
namespace example for beginners_guide_to_k8s
apiVersion: v1
kind: Namespace
metadata:
name: dvlp-k8s
@kimschles
kimschles / deployment.yml
Created December 20, 2018 17:27
deployment example for beginners_guide_to_k8s
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: dvlp-app
spec:
selector:
matchLabels:
app: dvlp-app
template:
metadata:
@kimschles
kimschles / hpa.yml
Last active December 20, 2018 18:41
horizontal pod autoscaler example for beginners_guide_to_k8s
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: dvlp-app
spec:
minReplicas: 1
maxReplicas: 30
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
@kimschles
kimschles / Dockerfile
Last active December 26, 2018 17:34
Dockerfile for beginners_guide_to_k8s
FROM node:carbon
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
CMD ["npm", "start"]
@kimschles
kimschles / service.yml
Created December 26, 2018 18:09
service example for beginners_guide_to_k8s
apiVersion: v1
kind: Service
metadata:
name: dvlp-app
labels:
app: dvlp-app
spec:
type: LoadBalancer
ports:
- name: http
@kimschles
kimschles / yearConstructor.js
Created December 29, 2018 22:14
Example of JS constructor
const isLeap = (year) => {
class Year {
constructor() {
this.year = year
}
}
let now = new Year();
return now.year
};
@kimschles
kimschles / edtech-denver.md
Last active March 11, 2019 16:09
EdTech Companies in Denver
@kimschles
kimschles / loop-array.js
Created March 4, 2019 02:10
loop-array.js from CJ's accelerator
// 1. Write a for loop that will log each element in the following array
let instructors = ['CJ', 'Casey', 'Kim', 'Kyle'];
// 2. Write a for loop that will log each element in the following array
let numbers = [4, 8, 15, 16, 23, 42];
// 3. Write a for loop that will log each element in the following array
@kimschles
kimschles / ci-binary-download.md
Created September 9, 2019 17:00
Download binary and make it an executable
  install_polaris: &install_polaris
    run:
      name: Install Polaris
      command: |
        curl -L "https://github.com/FairwindsOps/polaris/releases/download/0.4.0/polaris_0.4.0_Linux_x86_64.tar.gz" > polaris.tar.gz
        tar -xvf polaris.tar.gz
        chmod +x polaris
 mv ./polaris /usr/local/bin```
@kimschles
kimschles / keybase.md
Created September 25, 2019 17:30
Keybase Proof

Keybase proof

I hereby claim:

  • I am kimschles on github.
  • I am kimschles (https://keybase.io/kimschles) on keybase.
  • I have a public key ASBeMtQLgjpfXlqzlHzsntZtXW3OUpfH_7O4lStB2vSLGgo

To claim this, I am signing this object: