Giter VIP home page Giter VIP logo

k8slove2020's Introduction

NOTE: All files created by the following commands are uploaded in the repo

q1

  1. Create Dockerfile adhochttpd.dockerfile and script start.sh
  2. Build image:
docker build -t crjain/may2020q1:v1 -f adhochttpd.dockerfile .
  1. Run Container for x=app1:
docker run -d --name chinmay_test5 -p 2660:80 -e x=app1 crjain/may2020q1:v1

Q1_1 4. Run Container for x=app2:

docker run -d --name chinmay_test6 -p 2670:80 -e x=app2 crjain/may2020q1:v1

Q1_2

q2

  1. Create q2.yaml by running:
kubectl run adhocpod1 --image=nginx --port 80 --dry-run=client -o yaml > q2.yaml
kubectl create service nodeport q2svcchinmay --tcp 80 --dry-run=client -o yaml >> q2.yaml
  1. Create pod and service by running:
kubectl create -f q2.yaml

Screenshot: q2

q4

  1. Create q4.yaml.
  2. Append service to q4.yaml by running:
kubectl create service loadbalancer q4svcchinmay --tcp 80 --dry-run=client -o yaml >> q4.yaml
  1. Run:
kubectl create -f q4.yaml

Q4

q8

  1. Create podexam.yml and append service file to it. Make edits in service like change selector with label of pod.
  2. Create pod and service by running:
kubectl create -f podexam.yml
  1. This will show an error in status of pod "ImagePullBackOff".
  2. Edit podexam.yml to correct the spelling of image to "nginx".
  3. Then run command:
kubectl apply -f podexam.yml
  1. Now the pod will come in running state. Q8

k8slove2020's People

Contributors

crjain avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.