Skip to content

Instantly share code, notes, and snippets.

View parisnakitakejser's full-sized avatar

Paris Nakita Kejser parisnakitakejser

View GitHub Profile
@parisnakitakejser
parisnakitakejser / typeahead-demo.html
Created June 1, 2015 11:37
Boostrap 3.x - Typeahead - jQuery
Search: <input type="text" value="" class="typeahead" />
<input tyep="hidden" id="inputTmpID" value="" />
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css' rel='stylesheet' >
<![endif]-->
<style>
body { margin:0; padding:0; }
@parisnakitakejser
parisnakitakejser / self-sigend.sh
Created January 3, 2022 00:30
Create self-signed certificate with OpenSSL and create the secret into Kubernetes
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout k8s-ssl.test.key -out k8s-ssl.test.crt -subj "/CN=k8s-ssl.test"
kubectl create secret tls k8s-ssl.test --key="k8s-ssl.test.key" --cert="k8s-ssl.test.crt"
@parisnakitakejser
parisnakitakejser / ingress-with-tls.yml
Last active January 3, 2022 00:38
Setup ingress into Kubernetes with TLS support for k8s-ssl.test domain
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tls-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
tls:
- hosts:
- k8s-ssl.test
@parisnakitakejser
parisnakitakejser / service-port-80+443.yml
Created January 3, 2022 00:48
Create a service there open for port 80+443 into the selector group ingress: TLSIngress
apiVersion: v1
kind: Service
metadata:
name: k8s-ssl
spec:
selector:
ingress: TLSIngress
ports:
- name: http
protocol: TCP
@parisnakitakejser
parisnakitakejser / change-port-80-to-8080.yml
Created January 3, 2022 00:52
Create a service to Kubernetes there can change the port number 80 to 8080 for selector group service: k8s-ssl-web1
apiVersion: v1
kind: Service
metadata:
labels:
service: k8s-ssl
name: k8s-ssl-web
spec:
ports:
- name: "8080"
port: 8080
@parisnakitakejser
parisnakitakejser / deployment-with-tls-support.yml
Created January 3, 2022 00:53
Create a deployment into Kubernetes with TLS support if its have the needed services in the selector group ingress: TLSIngress
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-tls
spec:
selector:
matchLabels:
ingress: TLSIngress
replicas: 3
template:
@parisnakitakejser
parisnakitakejser / minikube.ps
Created January 2, 2022 11:53
Up and running with Minikube on Windows 10
winget install minikube
minikube start --memory 8192 --cpus 4
minikube config view vm-driver
minikube start
minikube dashboard
@parisnakitakejser
parisnakitakejser / kubectl-test.ps
Last active January 3, 2022 01:05
Kubectl - Testing Minikube is up and running
# Create deployment with nginx image
kubectl create deployment hello-node --image=nginx
kubectl get deployments
# Expose port 8080 on your Deployment as LoadBalancer
kubectl expose deployment hello-node --type=LoadBalancer --port=80
kubectl get services
# Start tunnel on Minikube
minikube tunnel
@parisnakitakejser
parisnakitakejser / service-with-2-python-flask-test-services.yml
Last active January 8, 2022 21:25
Service and Pods with support hostname & subdomain
apiVersion: v1
kind: Service
metadata:
name: default-subdomain
spec:
selector:
app: web
ports:
- name: "5000"
port: 5000