Skip to content

Instantly share code, notes, and snippets.

View p-le's full-sized avatar
🏠
Working from home

Phu Le p-le

🏠
Working from home
View GitHub Profile
@p-le
p-le / Vagrantfile
Last active October 8, 2020 03:55
Vagrantfile for AWS EKS
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# https://app.vagrantup.com/hashicorp/boxes/bionic64
config.vm.box = "hashicorp/bionic64"
config.vm.box_check_update = true
# Create a private network, which allows host-only access to the machine
@p-le
p-le / Vagrantfile
Created October 4, 2020 12:55
Vagrantfile + Minikube
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.20"
config.vm.provider "virtualbox" do |vb|
@p-le
p-le / headless_service.yaml
Created September 28, 2020 14:45
k3d + vagrant + rabbitmq headless_service.yaml
apiVersion: v1
kind: Service
metadata:
name: rabbitmq
labels:
app: rabbitmq
spec:
ports:
- name: epmd
port: 4369
@p-le
p-le / statefulset.yaml
Last active September 28, 2020 14:29
k3d + vagrant + rabbitmq statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: rabbitmq
spec:
serviceName: rabbitmq
replicas: 3
selector:
matchLabels:
app: rabbitmq
@p-le
p-le / role_binding.yaml
Last active September 28, 2020 14:29
k3d + vagrant + rabbitmq role_binding.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: rabbitmq
subjects:
- kind: ServiceAccount
name: rabbitmq
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@p-le
p-le / service_account.yaml
Last active September 28, 2020 14:29
k3d + vagrant + rabbitmq service_account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: rabbitmq
@p-le
p-le / role.yaml
Last active September 28, 2020 14:29
k3d + vagrant + rabbitmq role.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: rabbitmq
rules:
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get"]
- apiGroups: [""]
resources: ["events"]
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin
namespace: kubernetes-dashboard
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths: