Giter VIP home page Giter VIP logo

advprog-module-11's Introduction

advprog-module-11

Hello Minikube Reflection

1.

Compare the application logs before and after you exposed it as a Service.

Before using service

After using servicee

Try to open the app several times while the proxy into the Service is running.

What do you see in the logs? Does the number of logs increase each time you open the app?

When the application is exposed as a service, it will show the logs whenever the application is accessed with GET.

2

Notice that there are two versions of kubectl get invocation during this tutorial section.

The first does not have any option, while the latter has -n option with value set to kube-system.

What is the purpose of the -n option and why did the output not list the pods/services that you explicitly created?

The option n is used to determine namespace in Kubernetes cluster, which is used to allocate and organize resources in a cluster.

Rolling Update & Kubernetes Manifest File Reflection

1

What is the difference between Rolling Update and Recreate deployment strategy?

Rolling Update is a deployment strategy where the application is updated incrementally without any downtime, while recreate is a deployment strategy where the application is updated by stopping the old version and then starting the new version.

2

Try deploying the Spring Petclinic REST using Recreate deployment strategy and document your attempt.

  1. Starting Starting minikube

  2. Creating deployment yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: spring-petclinic-rest
  labels:
    app: spring-petclinic
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: spring-petclinic
  template:
    metadata:
      labels:
        app: spring-petclinic
    spec:
      containers:
      - name: spring-petclinic-rest
        image: springcommunity/spring-petclinic-rest:2.4.2
        ports:
        - containerPort: 9966
  1. Apply development alt text

  2. Creating service yaml

apiVersion: v1
kind: Service
metadata:
  name: spring-petclinic-rest
spec:
  selector:
    app: spring-petclinic
  ports:
    - protocol: TCP
      port: 80
      targetPort: 9966
  type: LoadBalancer
  1. Apply service alt text

  2. Running the service alt text

3

Prepare different manifest files for executing Recreate deployment strategy.

apiVersion: v1
kind: Service
metadata:
  name: spring-petclinic-rest
spec:
  selector:
    app: spring-petclinic
  ports:
    - protocol: TCP
      port: 80
      targetPort: 9966
  type: LoadBalancer

4

What do you think are the benefits of using Kubernetes manifest files?

Using manifest file makes the development faster, there are version control, they are reproducible, and can be automated.

Recall your experience in deploying the app manually and compare it to your experience when deploying the same app by applying the manifest files (i.e., invoking kubectl apply -f command) to the cluster

I'd prefer to use manifest instead of doing everything manually.

advprog-module-11's People

Contributors

belatijagad 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.