modified: README.md
new file: manifests/nginx-simple-deployment.yaml
This commit is contained in:
12
README.md
12
README.md
@@ -21,6 +21,7 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
|||||||
- [Resources](#resources)
|
- [Resources](#resources)
|
||||||
- [Persistent volumes claims](#persistent-volumes-claims)
|
- [Persistent volumes claims](#persistent-volumes-claims)
|
||||||
- [Services Accounts](#services-accounts)
|
- [Services Accounts](#services-accounts)
|
||||||
|
- [Namespaces](#namespaces)
|
||||||
- [Secrets](#secrets)
|
- [Secrets](#secrets)
|
||||||
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
||||||
- [Manifest - StringData](#manifest---stringdata)
|
- [Manifest - StringData](#manifest---stringdata)
|
||||||
@@ -280,6 +281,17 @@ kubectl get secret <secret_name> -o jsonpath='{.data.token}' | base64 -d > ./ser
|
|||||||
kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}'
|
kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Namespaces
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: namespace-name
|
||||||
|
labels:
|
||||||
|
name: namespace-name
|
||||||
|
```
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|
||||||
### Manifest - Opaque / Base64
|
### Manifest - Opaque / Base64
|
||||||
|
|||||||
57
manifests/nginx-simple-deployment.yaml
Normal file
57
manifests/nginx-simple-deployment.yaml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nginx
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- name: html
|
||||||
|
mountPath: /usr/share/nginx/html
|
||||||
|
volumes:
|
||||||
|
- name: html
|
||||||
|
configMap:
|
||||||
|
name: nginx-html
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nginx-html
|
||||||
|
namespace: tests
|
||||||
|
data:
|
||||||
|
index.html: |
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Hello World</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hello, World!</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: nginx-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: nginx
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
Reference in New Issue
Block a user