Skip to content

Commit

Permalink
YML files of k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
ravimalvia committed Jan 6, 2023
0 parents commit 82846a7
Show file tree
Hide file tree
Showing 19 changed files with 306 additions and 0 deletions.
13 changes: 13 additions & 0 deletions NodePort.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: npservice

spec:
type: NodePort
selector:
dc: mumbai
ports:
- port: 80
targetPort: 80
nodePort: 30001
11 changes: 11 additions & 0 deletions env_pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: envpd
spec:
containers:
- name: newpod
image: vimal13/apache-webserver-php
env:
- name: x
value: '5'
25 changes: 25 additions & 0 deletions ingress/ingress_setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mysite

spec:
rules:
- host: www.ravilw.com
http:
paths:
- path: /search
pathType: Prefix
backend:
service:
name: mysearchd
port:
number: 80

- path: /mail
pathType: Prefix
backend:
service:
name: maild
port:
number: 80
12 changes: 12 additions & 0 deletions kube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: mypod7
labels:
"continent": "India"
"Langauge": "Hindi"

spec:
containers:
- name: "myd1"
image: httpd
34 changes: 34 additions & 0 deletions nfs-client-provisioner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: nfs-client-provisioner
spec:
replicas: 1
selector:
matchLabels:
app: nfs-client-provisioner
strategy:
type: Recreate
template:
metadata:
labels:
app: nfs-client-provisioner
spec:
containers:
- name: nfs-client-provisioner
image: k8s.gcr.io/sig-storage/nfs-subdir-external-provisioner:v4.0.2
volumeMounts:
- name: nfs-client-root
mountPath: /mkube
env:
- name: PROVISIONER_NAME
value: k8s-sigs.io/nfs-subdir-external-provisioner
- name: NFS_SERVER
value: 192.168.56.103
- name: NFS_PATH
value: /mynfs
volumes:
- name: nfs-client-root
nfs:
server: 192.168.56.103
path: /mynfs
11 changes: 11 additions & 0 deletions pod_with_dif_namespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: mypod
namespace: team
labels:
dc: IN
spec:
containers:
- name: newhttpd
image: httpd
17 changes: 17 additions & 0 deletions podtestpv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Pod
metadata:
name: podtest
labels:
dc: IN
spec:
volumes:
- name: pvc-to-claim
persistentVolumeClaim:
claimName: pvcbyravi
containers:
- name: pvcbindpod
image: httpd
volumeMounts:
- mountPath: /var/www/data
name: pvc-to-claim
11 changes: 11 additions & 0 deletions pv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: pvgiven
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 1G
hostPath:
path: /mnt/rahul
10 changes: 10 additions & 0 deletions pvcravi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvcbyravi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1G
25 changes: 25 additions & 0 deletions rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: myrc2

spec:
replicas: 1
selector:
continent: Asia
country: russia
language: russian

template:
metadata:
name: mypod
labels:
continent: Asia
country: russia
language: russian
spec:
containers:
- name: cont1
image: httpd


21 changes: 21 additions & 0 deletions rc.yml .txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: myrc

spec:
replicas: 1
selector:
continent: Asia
template:
metadata:
name: mypod
labels:
country: India
Language: Hindi
spec:
containers:
- name: cont1
image: httpd


22 changes: 22 additions & 0 deletions rcpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: rcpods

spec:
replicas: 3
selector:
site: social

template:
metadata:
name: threepods
labels:
site: social
city: jaipur
spec:
containers:
- name: mypod
image: vimal13/apache-webserver-php


18 changes: 18 additions & 0 deletions rcpods_with_nodeport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: rc1

spec:
replicas: 3
selector:
dc: mumbai
template:
metadata:
name: webserver
labels:
dc: mumbai
spec:
containers:
- name: myweb
image: vimal13/apache-webserver-php
27 changes: 27 additions & 0 deletions rs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: myrs
spec:
replicas: 3
selector:
matchLabels:
app: web
matchExpressions:
- {key: dc, operator: In, values: [ india ]}
- {key: region, operator: In, values: [ mumbai ]}
template:
metadata:
name: mypods
labels:
dc: india
region: mumbai
app: web
spec:
containers:
- name: phppod
image: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: redhat

22 changes: 22 additions & 0 deletions sc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
items:
- apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"},"labels":{"addonmanager.kubernetes.io/mode":"EnsureExists"},"name":"standard"},"provisioner":"k8s.io/minikube-hostpath"}
storageclass.kubernetes.io/is-default-class: "true"
creationTimestamp: "2022-10-05T08:40:41Z"
labels:
addonmanager.kubernetes.io/mode: EnsureExists
name: standard
resourceVersion: "369"
uid: 56788c0b-320e-4d9e-94bf-df3e0772ec4f
provisioner: k8s.io/minikube-hostpath
reclaimPolicy: Delete
volumeBindingMode: Immediate
kind: List
metadata:
resourceVersion: ""
selfLink: ""
Empty file added sc_nfs.yml
Empty file.
10 changes: 10 additions & 0 deletions sc_yml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-sc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
11 changes: 11 additions & 0 deletions sql_pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: dbpod
spec:
containers:
- name: sqlpod
image: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: redhat
6 changes: 6 additions & 0 deletions vim.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<body bgcolor='gray'>
<html>

<h1> this is my WEB page</h1>

</html>

0 comments on commit 82846a7

Please sign in to comment.