Skip to content

Latest commit

 

History

History
303 lines (227 loc) · 5.04 KB

24-Practice-Test-CKA-Ingress-Net-1.md

File metadata and controls

303 lines (227 loc) · 5.04 KB

Practice Test CKA Ingress 1

Solution

  1. Check the Solution

    Ok
    
  2. Check the Solution

    INGRESS-SPACE
    
  3. Check the Solution

    NGINX-INGRESS-CONTROLLER
    
  4. Check the Solution

    APP-SPACE
    
  5. Check the Solution

    3
    
  6. Check the Solution

    APP-SPACE
    
  7. Check the Solution

    INGRESS-WEAR-WATCH
    
  8. Check the Solution

    ALL-HOSTS(*)
    
  9. Check the Solution

    WEAR-SERVICE
    
  10. Check the Solution

     /WATCH
    
  11. Check the Solution

     DEFAULT-HTTP-BACKEND
    
  12. Check the Solution

     404-ERROR-PAGE
    
  13. Check the Solution

     OK
    
  14. Check the Solution

    kubectl edit ingress --namespace app-space
    
    Change the path from /watch to /stream
    
    OR
    
    apiVersion: v1
    items:
    - apiVersion: extensions/v1beta1
      kind: Ingress
      metadata:
        annotations:
          nginx.ingress.kubernetes.io/rewrite-target: /
          nginx.ingress.kubernetes.io/ssl-redirect: "false"
        name: ingress-wear-watch
        namespace: app-space
      spec:
        rules:
        - http:
            paths:
            - backend:
                serviceName: wear-service
                servicePort: 8080
              path: /wear
              pathType: ImplementationSpecific
            - backend:
                serviceName: video-service
                servicePort: 8080
              path: /stream
              pathType: ImplementationSpecific
      status:
        loadBalancer:
          ingress:
          - {}
    kind: List
    metadata:
      resourceVersion: ""
      selfLink: ""
    
  15. Check the Solution

     OK
    
  16. Check the Solution

     404 ERROR PAGE
    
  17. Check the Solution

     OK
    
  18. Check the Solution

     Run the command 'kubectl edit ingress --namespace app-space' and add a new Path entry for the new service.
    
     OR
    
    apiVersion: v1
    items:
    - apiVersion: extensions/v1beta1
      kind: Ingress
      metadata:
        annotations:
          nginx.ingress.kubernetes.io/rewrite-target: /
          nginx.ingress.kubernetes.io/ssl-redirect: "false"
        name: ingress-wear-watch
        namespace: app-space
      spec:
        rules:
        - http:
            paths:
            - backend:
                serviceName: wear-service
                servicePort: 8080
              path: /wear
              pathType: ImplementationSpecific
            - backend:
                serviceName: video-service
                servicePort: 8080
              path: /stream
              pathType: ImplementationSpecific
            - backend:
                serviceName: food-service
                servicePort: 8080
              path: /eat
              pathType: ImplementationSpecific
      status:
        loadBalancer:
          ingress:
          - {}
    kind: List
    metadata:
      resourceVersion: ""
      selfLink: ""
    
  19. Check the Solution

     OK
    
  20. Check the Solution

     CRITICAL-SPACE
    
  21. Check the Solution

     WEBAPP-PAY
    
  22. Check the Solution

     apiVersion: extensions/v1beta1
     kind: Ingress
     metadata:
       name: test-ingress
       namespace: critical-space
       annotations:
         nginx.ingress.kubernetes.io/rewrite-target: /
     spec:
       rules:
       - http:
           paths:
           - path: /pay
             backend:
               serviceName: pay-service
               servicePort: 8282
    
  23. Check the Solution

     OK