-
-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Update Kubernetes introduction and add Secret Management se…
…ction
- Loading branch information
1 parent
8c32f27
commit 7e2f6a3
Showing
14 changed files
with
148 additions
and
9 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
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
{ | ||
"label": "Kustomize", | ||
"position": 5 | ||
} |
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,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nginx-configmap | ||
namespace: nginx-demo | ||
data: | ||
index.html: | | ||
<h1> Hello World from ConfigMap </h1> |
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,41 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
namespace: nginx-demo | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx-app | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx-app | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:latest | ||
ports: | ||
- containerPort: 80 | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: / | ||
port: 80 | ||
volumeMounts: | ||
- name: html-file | ||
mountPath: /usr/share/nginx/html | ||
|
||
volumes: | ||
- name: html-file | ||
configMap: | ||
name: nginx-configmap | ||
|
||
|
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,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: nginx-demo | ||
resources: | ||
- Deployment.yaml | ||
- Service.yaml | ||
- ConfigMap.yaml |
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,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx-service-clusterip | ||
namespace: nginx-demo | ||
spec: | ||
selector: | ||
app: nginx-app | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |
8 changes: 8 additions & 0 deletions
8
docs/kubernetes/tools/kustomize/app/development/Kustomization.yaml
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,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: nginx-demo | ||
resources: | ||
- ../base | ||
patches: | ||
- path: ./patches/Deployment.yaml | ||
- path: ./patches/ConfigMap.yaml |
8 changes: 8 additions & 0 deletions
8
docs/kubernetes/tools/kustomize/app/development/patches/ConfigMap.yaml
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,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nginx-configmap | ||
namespace: nginx-demo | ||
data: | ||
index.html: | | ||
<h1> Hello World from Development </h1> |
12 changes: 12 additions & 0 deletions
12
docs/kubernetes/tools/kustomize/app/development/patches/Deployment.yaml
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: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
namespace: nginx-demo | ||
spec: | ||
replicas: 2 | ||
template: | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.26.0 |
8 changes: 8 additions & 0 deletions
8
docs/kubernetes/tools/kustomize/app/production/Kustomization.yaml
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,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: nginx-demo | ||
resources: | ||
- ../base | ||
patches: | ||
- path: ./patches/Deployment.yaml | ||
- path: ./patches/ConfigMap.yaml |
8 changes: 8 additions & 0 deletions
8
docs/kubernetes/tools/kustomize/app/production/patches/ConfigMap.yaml
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,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nginx-configmap | ||
namespace: nginx-demo | ||
data: | ||
index.html: | | ||
<h1> Hello World from Production </h1> |
12 changes: 12 additions & 0 deletions
12
docs/kubernetes/tools/kustomize/app/production/patches/Deployment.yaml
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: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
namespace: nginx-demo | ||
spec: | ||
replicas: 3 | ||
template: | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.27.0 |
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,14 @@ | ||
--- | ||
title: Kustomize | ||
sidebar_position: 1 | ||
--- | ||
|
||
## Kustomize | ||
|
||
Kustomize is a tool that lets you customize raw, template-free YAML files for multiple purposes, leaving the original YAML untouched and usable as is. | ||
|
||
|
||
|
||
Kustomize uses the `apiVersion`, `kind`, `name` and `namespace` to identify resources. It appends a suffix to the name and namespace fields to differentiate between different versions of the same resource. | ||
|
||
|