Decommission k8s environment
Need a little more time in the playground before I have use of a production-grade environment. Especially when it's costing $20/mo
This commit is contained in:
parent
51779a1f7e
commit
da450c08dd
9 changed files with 0 additions and 119 deletions
|
@ -1,4 +0,0 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- whoami
|
|
@ -1,24 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: whoami
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: whoami
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: whoami
|
||||
spec:
|
||||
containers:
|
||||
- name: whoami
|
||||
image: traefik/whoami
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
ports:
|
||||
- containerPort: 80
|
||||
imagePullPolicy: Always
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: whoami
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: whoami.localhost
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: whoami
|
||||
port:
|
||||
number: 80
|
|
@ -1,8 +0,0 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: whoami
|
||||
resources:
|
||||
- deployment.yml
|
||||
- ingress.yml
|
||||
- namespace.yml
|
||||
- service.yml
|
|
@ -1,4 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: whoami
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: whoami
|
||||
labels:
|
||||
app: whoami
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: whoami
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
kubectl apply -k ./k8s
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
PATH=${PWD}/env/bin:${PATH}
|
||||
|
||||
yamllint -c ./yamllint.yml ./k8s
|
|
@ -1,37 +0,0 @@
|
|||
resource "linode_lke_cluster" "the-ring" {
|
||||
label = "the-ring"
|
||||
k8s_version = "1.22"
|
||||
region = "eu-west"
|
||||
|
||||
pool {
|
||||
type = "g6-standard-1"
|
||||
count = 1
|
||||
}
|
||||
}
|
||||
|
||||
resource "linode_firewall" "the-ring" {
|
||||
label = "the-ring"
|
||||
linodes = [
|
||||
for node in linode_lke_cluster.the-ring.pool[0].nodes :
|
||||
node.instance_id
|
||||
]
|
||||
outbound_policy = "ACCEPT"
|
||||
inbound_policy = "DROP"
|
||||
|
||||
inbound {
|
||||
label = "allow-ping"
|
||||
action = "ACCEPT"
|
||||
protocol = "ICMP"
|
||||
ipv4 = ["0.0.0.0/0"]
|
||||
ipv6 = ["::/0"]
|
||||
}
|
||||
|
||||
inbound {
|
||||
label = "allow-k8s-unprivileged"
|
||||
action = "ACCEPT"
|
||||
protocol = "TCP"
|
||||
ports = "30000-32767"
|
||||
ipv4 = ["0.0.0.0/0"]
|
||||
ipv6 = ["::/0"]
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue