Kubernetes Interview Questions:
==============================
1).What is Deamonset into the kubernetes?
Deamonset:
2).what is the deployment into kubernestes?
=================
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
===============================
3).what is the statefulset into kubernetes?
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql
spec:
serviceName: mysql
replicas: 3
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql:8
volumeMounts:
- name: data
mountPath: /var/lib/mysql
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
4).what is the sue of service account into kubernestes into it ?
=========================================================
A ServiceAccount provides an identity to pods so that Kubernetes can authenticate and authorize their access to cluster resources using RBAC.”
=========================================================
apiVersion: v1
kind: ServiceAccount
metadata:
name: app-sa
===========================
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
serviceAccountName: app-sa
containers:
- name: app
image: nginx
=============================
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: pod-reader
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list"]
==============================''
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: read-pods
subjects:
- kind: ServiceAccount
name: app-sa
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io
=======================
5).what is the pod into the kubernestes into it ?
apiVersion: v1
kind: Pod
metadata:
name: my-pod
labels:
app: demo
spec:
containers:
- name: nginx-container
image: nginx
ports:
- containerPort: 80
6).what is the differnt kubernestes services into it ?
nodeip
cluster port
load blnacer
external name
headless service
pods
services
cluster
rbacs
ingress controllers
master node
worker node
7).what is the side conatiner into kubernetes?
8).what is crashloop error ?
9).what is configmap into kubenrrstes ?
capiVersion: v1
kind: ConfigMap
metadata:
name: simple-config
data:
APP_NAME: myapp
APP_ENV: dev
=================
kubectl apply -f configmap.yaml
==================
kubectl get configmap
kubectl describe configmap simple-config
10).what is secretes into kubernestes into it ?
====================================================================
Linux interview Questions :
1).How to recover accidently deleted /etc/fstab into linux os ? anyone deleted this /etc/fstab .after this we can' boot ur os. boot into recovery mode . then go to the linux terminal page . here we have to execute the blkid command here it will list out the avilble partions and attached filesystems . if your deleting the /etc/fatab.that time root parttion won't be work now we can mount the root parttion in rw mode mount -t ext4 -0 rw,remount dev/sda1 / 2).VMSTAT command into linux ? 3).iostat and dstat command into linux os ? 4).LInux free command into linux os ? in this way we can check it our the memeory usage and swap memeory as well. then it will display out the , used,space avilble ,total ,buffer/catche abd shared what is free space we can execute the command like as the, free -b command : we will get the particular output for the bits so if you want to getto int the outpit in kilobytes : so we can execut ethe comamnd like as the, free -k free -g: it will sh...
Comments
Post a Comment