Skip to content

Latest commit

 

History

History
158 lines (127 loc) · 3.79 KB

elmassafi.md

File metadata and controls

158 lines (127 loc) · 3.79 KB

Training Topic

Kubernets Basics

  1. What is Kubernetes?

  2. Components of Kubernetes1.

    image of components3

  3. Controllers2:

    • What are they?
    • Types:
      • ReplicaSets
      • Deployments*
      • StatefulSets*
      • DaemonSets*
      • Jobs
      • CronJob
      • Garbage Collection
      • TTL Controller or Finished Resources
      • ReplicationController
  4. Services and Ingress:

    • Services:

      • ClusterIP
      • NodePort
      • LoadBalancer
    • Ingress Resource:

        internet
           |
        [ Ingress ]
        --|-----|--
        [ Services ]
      
      • Types of Ingresses4:

        • Single Service Ingress:

          apiVersion: networking.k8s.io/v1beta1
          kind: Ingress
          metadata:
          name: test-ingress
          spec:
          backend:
             serviceName: testsvc
             servicePort: 80
          
        • Simple fanout:

          foo.bar.com -> 178.91.123.132 -> / foo    service1:4200
                                           / bar    service2:8080
        
          apiVersion: networking.k8s.io/v1beta1
          kind: Ingress
          metadata:
          name: simple-fanout-example
          annotations:
             nginx.ingress.kubernetes.io/rewrite-target: /
          spec:
          rules:
          - host: foo.bar.com
             http:
                paths:
                - path: /foo
                backend:
                   serviceName: service1
                   servicePort: 4200
                - path: /bar
                backend:
                   serviceName: service2
                   servicePort: 8080
        
        
        • Name based virtual hosting
            foo.bar.com --|                 |-> foo.bar.com service1:80
                          | 178.91.123.132  |
            bar.foo.com --|                 |-> bar.foo.com service2:80
        
        
        apiVersion: networking.k8s.io/v1beta1
        kind: Ingress
        metadata:
        name: name-virtual-host-ingress
        spec:
        rules:
        - host: foo.bar.com
          http:
             paths:
             - backend:
                serviceName: service1
                servicePort: 80
        - host: bar.foo.com
          http:
             paths:
             - backend:
                serviceName: service2
                servicePort: 80
        
        
        • TLS
          apiVersion: v1
          kind: Secret
          metadata:
             name: testsecret-tls
             namespace: default
          data:
             tls.crt: base64 encoded cert
             tls.key: base64 encoded key
          type: kubernetes.io/tls
        
        
          apiVersion: networking.k8s.io/v1beta1
          kind: Ingress
          metadata:
          name: tls-example-ingress
          spec:
          tls:
          - hosts:
                - sslexample.foo.com
             secretName: testsecret-tls
          rules:
          - host: sslexample.foo.com
             http:
                paths:
                - path: /
                backend:
                   serviceName: service1
                   servicePort: 80
        
        

1: components of kubernetes

2: controllers

3: image source

4: ingress explained