Introduction I have worked on both Private cloud like OpenStack and Public clouds like AWS, Azure and GCP. I work on depploying and Upgrading Openstack enviornments. Also building CI/CD pipeline to automate the OpenStack deployments using Jenkins pipelines and Ansible playbooks. Also worked on Tenant onboarding team where I was onboarding and upgrading different VNF's related to 4Gand 5G. Also I moved to the Contrainzered team and We started automating Kubernetes deployments using Jenkins and Ansible. I wrote helm charts to deploy our internal applications on to the deployed Kubernetes environments. **Part - 1 Questions** **1. Suppose you have new Jenkins server install and you need to connect github, what will be your process?** 1. First, I will install `Git Plugin` in Jenkins 2. Second create a webhook in Git 3. Third create a `Jenkinsfile` in the repo you require. 4. Now Push a PR or code in the repo and pipeline should be triggered in Jenkins **2. Suppose you have new version installed in your prod and you find a bug, what will be your branching strategy** Lets assume we have a `13.1 branch` version pushed to prod and we have a bug in it. So we can push the fix to 3.1 branch and create a new tag out of it, like `13.1-hotfix-1` or `13.1-rc-1` In cases where we have `3.1 branch` locked, we can push the fix to `master branch` or to the branch from where `3.1 branch was cut` **3. Kuberntes version, i started using kuberntes from `1.17` I used kubernetes `1.18`, `1.19` , `1.20` and `1.21`** **4. Kubernetes Service vs Node Port Vs Ingress** **Service**: The idea of a Service is to group a set of Pod endpoints into a single resource. Its mainly for internal communication **Nodeport**: A NodePort is an open port on every node of your cluster. Kubernetes transparently routes incoming traffic on the NodePort to your service, even if your application is running on a different node **Ingress**: Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. **Ingress vs Nodeport:** * In Nodeport Direct access to service is possible and Ingress doesnt have Direct access to service * Multiple ports per service possible in ingress and not possible in Nodeport * Allows use of standard service ports (80, 443, etc) in Ingress and Nodeport not possible **5. Tell me the types of services in kubernetes** There are five types of Services: **ClusterIP**, **Nodeport**, **Load Balancer**, **ExternalName** and **Headless** **ClusterIP** (default): Internal clients send requests to a stable internal IP address. **NodePort**: Clients send requests to the IP address of a node on one or more nodePort values that are specified by the Service. **LoadBalancer**: Clients send requests to the IP address of a network load balancer. **ExternalName**: Internal clients use the DNS name of a Service as an alias for an external DNS name. **Headless**: You can use a headless service when you want a Pod grouping, but don't need a stable IP address. **6. Differnace between Statefulset and Deployment** Every replica of a stateful set will have its own state, and each of the pods will be creating its own PVC(Persistent Volume Claim). Deployment would share same PV. **7. How to limit playbook on set of hosts or a single host** Use `limit` option on the playbook to limit the playbook on a host or a group. **8. How to pass variables while running the playbook** use `--extra-vars` while running the playbook to pass the values **9. Jenkins freestyle or Pipeline.** I use mostly pipeline style. As it provides Declarative Pipeline Syntax **10. Helm2 vs Helm3 security question changes** Helm 2 used config-maps to store release information. In Helm 3, secrets are used instead as the default storage driver. Also, they are stored in the same namespace where the release is deployed. Previously, the release information was stored in the same namespace where tiller is deployed. **11. Webserver or ngnix not reachable?** I will try to curl the web server and If its not reachable, I will try to log into the server and then curl from the server using localhost. if its not reachable from server, I will check the logs, then i will check if the service is running, then check the disk utilization, then check cpu and load averages. then i will check if there are too many openfiles. Then i will Check for zombie process using `ps aux | egrep "Z|defunct"`, and kill zombie process. **12. What is static pod?** Static pods are pods created and managed by kubelet daemon on a specific node. If the static pod crashes, kubelet restarts them. Control plane is not involved in lifecycle of static pod. **13. how to identify static pods** deployment pod would have `deploymentname-hashvalue` statefulset pod would have `statefulsetname-0` or `statefulname-1` static pod would have `staticpod-nodename` **Part 2 Questions** 1. How to check which ports are being used in linux `netstat -na | grep <the port number>` Example: `netstat -na | grep 8080` 2. How to get child process id from parent id? `pgrep -P <parent_process_id>` or `pstree -p <Parent_process_ID>` Example: * pgrep -P 6734 * pstree -p 9869 3. Check running process in Linux `ps aux` 4. How to curl from server or client curl `<hostname>` Example: * curl `www.google.com` * curl `192.0.0.1` 5. How to install packages in linux: In Debain Systems: like Ubuntu `apt get install <package name>` Example: * `apt get install googlechrom` * `apt get install ntp` In Red Hat Systems: yum install `<package name>` Example: * `yum install googlechrom` * `yum install ntp` 6. How to check routes in linux `route -n` Example: ``` $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0 192.168.0.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0 ``` 7. How do you analayze packets in linux `tcpdump` Example * `tcpdump -i eth0 udp` 8. How do you check the traffic flow between server A and Server B `traceroute <end server>` Example: if you want to check the traffic flow between your local server and google traceroute google.com ## Kubernetes 9. What container technologies are you familair with * docker * containerd 10. What is kubernetes Kubernetes is open source platform for managing containerized workloads and services. 11. liveness vs Readiness probe Kubernetes uses liveness probes to know when to restart a container. Kubernetes uses readiness probes to decide when the container is available for accepting traffic. 12. Replica Sets vs Replication controller The key difference between the replica set and the replication controller is, the replication controller only supports equality-based selector(selector whereas the replica set supports set-based selector(match Labels). 13. difference between a DaemonSet and deployment? A Daemonset will not run more than one replica per node. Another advantage of using a Daemonset is that, if you add a node to the cluster, then the Daemonset will automatically spawn a pod on that node, which a deployment will not do. 14. differnace between Statefulset and Deployment Every replica of a stateful set will have its own state, and each of the pods will be creating its own PVC(Persistent Volume Claim). Deployment would share same PV. 15. What is ingress Ingress provides the ability to pods to communicate outside of cluster. For example if your application needs to be accessed from outside of kubernetes cluster you need ingress `kubectl get ingress` 16. What is kube-proxy used for ? maintains network rules on nodes. 17. What is Kublet used for ? Kublet is the primary "node agent" that runs on each node in kubernetes cluster. 18. kubernetes architecture Kubernetes has Control Plan and Compute Plane Control Plane has below componenets: * kube-apiserver: Exposes the Kubernetes API. * etcd: Consistent and highly-available key value store used as Kubernetes' backing store for all cluster data. * kube-scheduler: Used to schedule pods * kube-controller-manager: Control plane component that runs controller processes. Compute Plane or Worker Node: * kubelet: An agent that runs on each node in the cluster. * Kube-proxy: maintains network rules on nodes. ![](https://i.imgur.com/kPhS001.png) ## Ansible 19. Ansible Scenarios/Experience Used ansible in different scenrios like * deploying, upgrading applications and VNF. * Updating configuration of Applications and VNF * Upgrading kernel or applying security patches. 20. What modules you used in ansible Used wide vaierty of ansible moudles like shell, lineinfile, blockinfile, copy, fetch, sysct, file, apt, yum modules ## General Questions 21. What Linux Flavours or Operating systme are you familar with? We used mostly ubuntu, We had few virtual machines which had red hat 22. What openstack deployments tools did you use? Mirantis Fuel, For some POC i used RedHat Director 23. Which Openstack did you use or which third party openstack or Vendor openstack Mostly Mirantis OpenStack and RedHat OpenStack 24. What openstack Versions are did you use I used most of the release from juno. Currently we use Newton, Queens and trains 25. Kubernetes Scenarios/Experience * Deploying and upgrading kubernetes.Deployed kubernetes using kubeadm and minikube(for development only), kind(for development only) * Deploying applications through helm charts on Kubernetes. Applications like web applications, CNF 26. Helm Chart Scenarios/Experience Writing helm chart from scratch Updating existing helm charts ![](https://i.imgur.com/SkiVhj1.png) 27. Jenkins or CICD Scenarios/Experience * Wrote Jenkins pipeline for deploying and upgrading applications * Wrote Jenkins pipeline for building docker containers * Wrote Jenkins pipeline for liniting, building code 28. OpenStack: ``` 1. Deploying and Upgrading OpenStack using Mirantis or RedHat Director 2. Deploying VNFs (4G or 5G) 3. Deploying VM's using Nova 4. Creating Networks and Subents using Neutron 5. Writing and Deploying Heat Templates 6. Used Glance to upload and manage Images 7. Used Keystone to manage Users, Projects ``` ## Versions 1. OpenStack Versions: Currently Using Train (but I have also worked on older OpenStack releases like Kilo, Netwon,Liberty, Stein) latest version is Xena 2. Red Hat OpenStack (OSPF 13,14,16) 3. Operating Systems: Ubuntu 14.04, 16.04,18.04, 20.04, Red Hat 6(old), 7(7.2,7.4,7.5,7.6) 4. Ansible: 1.9.3, 2.1, 2.4 5. Kubernetes: 1.12, 1.17, 1.20, 1.21 6. Ceph: Current Nautilus older versions: Mimic, Jewel, Nautilus, and Octopus (Latest) 7. Hardware/Servers: Dell Poweredge Software 740, 730 idrac HP Servers Software ILO