Initial commit.
This commit is contained in:
10
k8s/samples/basic.yaml
Normal file
10
k8s/samples/basic.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: alpine
|
||||
spec:
|
||||
containers:
|
||||
- name: alpine
|
||||
image: alpine:3.15
|
||||
command: ["sh", "-c", "while true; do sleep 3600; done"]
|
26
k8s/samples/nginx.yaml
Normal file
26
k8s/samples/nginx.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
# A nginx instance with a NodePort.
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: nginx
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.21
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
ports:
|
||||
- port: 8123 # Port exposed in cluster
|
||||
targetPort: 80 # Port inside container
|
||||
protocol: TCP
|
||||
nodePort: 31234
|
||||
selector:
|
||||
app: nginx
|
||||
type: NodePort
|
Reference in New Issue
Block a user