-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A beginning of long and great journey
- Loading branch information
Showing
833 changed files
with
143,192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vault-agent-sidecar/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: nginx | ||
name: nginx | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- image: nginx | ||
name: nginx | ||
ports: | ||
- containerPort: 80 | ||
protocol: TCP | ||
#changed https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#example-1 | ||
resources: | ||
requests: | ||
memory: "64Mi" | ||
cpu: "250m" | ||
limits: | ||
memory: "128Mi" | ||
cpu: "500m" | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx | ||
spec: | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
targetPort: 80 | ||
selector: | ||
app: nginx | ||
sessionAffinity: None | ||
type: LoadBalancer | ||
--- | ||
# Ingress resource example changed | ||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: nginx | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: / | ||
spec: | ||
ingressClassName: nginx-example | ||
rules: | ||
- http: | ||
paths: | ||
- path: /testpath | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: test | ||
port: | ||
number: 80 | ||
|
||
#older example | ||
|
||
# apiVersion: extensions/v1beta1 | ||
# kind: Ingress | ||
# metadata: | ||
# name: nginx | ||
# annotations: | ||
# ingress.kubernetes.io/ssl-redirect: "false" | ||
# spec: | ||
# rules: | ||
# - http: | ||
# paths: | ||
# - path: / | ||
# backend: | ||
# serviceName: nginx | ||
# servicePort: 80 | ||
|
||
# https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122 | ||
# Ingress resource example is replaced with this: https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.12-alpine | ||
command: [ "/bin/sh", "-c", "env" ] #changed so we can run **k logs nginx** to see configmap data. | ||
ports: | ||
- containerPort: 80 | ||
envFrom: | ||
- configMapRef: | ||
name: kubernauts | ||
restartPolicy: Never | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: nginx | ||
name: nginx | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- image: nginx | ||
name: nginx | ||
ports: | ||
- containerPort: 80 | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
# old code commented out #changed | ||
# apiVersion: extensions/v1beta1 | ||
# kind: Ingress | ||
# metadata: | ||
# name: nginx | ||
# annotations: | ||
# ingress.kubernetes.io/ssl-redirect: "false" | ||
# spec: | ||
# rules: | ||
# - http: | ||
# paths: | ||
# - path: / | ||
# backend: | ||
# serviceName: nginx | ||
# servicePort: 80 | ||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: nginx | ||
annotations: | ||
nginx.ingress.kubernetes.io/ssl-redirect: "false" | ||
spec: | ||
ingressClassName: nginx-example | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: nginx | ||
port: | ||
number: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx | ||
spec: | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
targetPort: 80 | ||
selector: | ||
app: nginx | ||
sessionAffinity: None | ||
type: ClusterIP | ||
--- | ||
# changed | ||
# apiVersion: extensions/v1beta1 | ||
# kind: Ingress | ||
# metadata: | ||
# name: nginx | ||
# annotations: | ||
# ingress.kubernetes.io/ssl-redirect: "false" | ||
# spec: | ||
# rules: | ||
# - http: | ||
# paths: | ||
# - path: / | ||
# backend: | ||
# serviceName: nginx | ||
# servicePort: 80 | ||
|
||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: nginx | ||
annotations: | ||
nginx.ingress.kubernetes.io/ssl-redirect: "false" | ||
spec: | ||
ingressClassName: nginx-example | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: nginx | ||
port: | ||
number: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: whoami-deployment | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: whoami | ||
template: | ||
metadata: | ||
labels: | ||
app: whoami | ||
spec: | ||
containers: | ||
- name: whoami-container | ||
image: containous/whoami |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# changed | ||
# apiVersion: extensions/v1beta1 | ||
# kind: Ingress | ||
# metadata: | ||
# name: whoami-ingress | ||
# annotations: | ||
# kubernetes.io/ingress.class: nginx | ||
# # traefik.ingress.kubernetes.io/rule-type: "PathPrefixStrip" | ||
# spec: | ||
# rules: | ||
# - host: csky08 | ||
# http: | ||
# paths: | ||
# - path: / | ||
# backend: | ||
# serviceName: whoami-service | ||
# servicePort: 80 | ||
|
||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: whoami-ingress | ||
annotations: | ||
ingressclass.kubernetes.io/is-default-class: "true" | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- host: csky08 | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: whoami-service | ||
port: | ||
number: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: whoami-service | ||
spec: | ||
ports: | ||
- name: http | ||
targetPort: 80 | ||
port: 80 | ||
selector: | ||
app: whoami | ||
type: ClusterIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
#name: whoami-service-loadbalancer #changed | ||
name: whoami-service | ||
spec: | ||
ports: | ||
- name: http | ||
targetPort: 80 | ||
port: 80 | ||
selector: | ||
app: whoami | ||
type: LoadBalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
#name: whoami-service-nodeport #changed | ||
name: whoami-service | ||
spec: | ||
ports: | ||
- name: http | ||
targetPort: 80 | ||
port: 80 | ||
selector: | ||
app: whoami | ||
type: NodePort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: whoareyou-deployment | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: whoareyou | ||
template: | ||
metadata: | ||
labels: | ||
app: whoareyou | ||
spec: | ||
containers: | ||
- name: whoareyou-container | ||
image: containous/whoami | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: whoareyou-service | ||
spec: | ||
ports: | ||
- name: http | ||
targetPort: 80 | ||
port: 80 | ||
selector: | ||
app: whoareyou | ||
--- | ||
# changed | ||
# apiVersion: extensions/v1beta1 | ||
# kind: Ingress | ||
# metadata: | ||
# name: whoareyou-ingress | ||
# annotations: | ||
# kubernetes.io/ingress.class: "traefik" | ||
# spec: | ||
# rules: | ||
# - host: node2 | ||
# http: | ||
# paths: | ||
# - path: / | ||
# backend: | ||
# serviceName: whoareyou-service | ||
# servicePort: http | ||
|
||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: whoareyou-ingress | ||
annotations: | ||
ingressclass.kubernetes.io/is-default-class: "true" | ||
spec: | ||
ingressClassName: traefik | ||
rules: | ||
- host: node2 | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: whoareyou-service | ||
port: | ||
number: 80 | ||
|
||
# Do we need to add IngreessClass https://kubernetes.github.io/ingress-nginx/#i-have-only-one-instance-of-the-ingresss-nginx-controller-in-my-cluster-what-should-i-do | ||
|
||
|
Oops, something went wrong.