Skip to content

Latest commit

 

History

History
231 lines (166 loc) · 6.33 KB

sc02-tc06.md

File metadata and controls

231 lines (166 loc) · 6.33 KB

SC02-TC06: Configure Guest Workload Cluster for Logging with Tanzu Extension of Fluentbit


Test Case Summary


Prerequisites

  • Completion of SC01-TC01, SC01-TC02
  • vSphere Administrator console and user credentials
  • SSH enabled on vCenter instance
  • SSH Login enabled on vCenter managing Kubernetes clusters
  • Download and install Tanzu CLI and Extensions Downloads, Tanzu-Extensions

Test Procedure

Secure Access From Cluster Nodes

  1. Authenticate to development Cluster Namespace

    kubectl vsphere login --vsphere-username ${SC_ADMIN_NAME} --server=https://${SC_API_VIP} --insecure-skip-tls-verify --tanzu-kubernetes-cluster-namespace ${SC_NAMESPACE_01}
    

    Expected:

    Logged in successfully. 
    You have access to the following contexts:
    ${SC_API_VIP}
    ${SC_NAMESPACE_01}

  2. Apply the TanzuKubernetesCluster spec to the SC namespace, development

    kubectl apply -f scenarios/devops/tkc-fluentbit.yaml
    
  3. Monitor the TKC cluster deployment progress with the following commands. This step is complete when the output from kubectl get tanzukubernetesclusters tkc-fluentbit -w reports PHASE as running and kubectl describe tanzukubernetesclusters tkc-fluentbit reports the Node Status for all nodes as ready.

    kubectl get tanzukubernetesclusters -w
    

    Expected:

     NAME          CONTROL PLANE   WORKER   DISTRIBUTION                      AGE     PHASE
     ...
     tkc-fluentbit   1               1        v1.18.19+vmware.1-tkg.1.17af790   7m37s   running
     
    kubectl describe tanzukubernetescluster tkc-fluentbit 
    

    Expected:

     ...
       Node Status:
     tkc-fluentbit-control-plane-8mhw9:             ready
     tkc-fluentbit-workers-s8fxw-65df5bc489-zpzbv:  ready
     ...
     
  4. Once in the running state authenticate to the tkc-fluent TanzuKubernetesCluster in the development SC namespace

    kubectl vsphere login --vsphere-username ${SC_ADMIN_NAME} --server=https://${SC_API_VIP} --insecure-skip-tls-verify --tanzu-kubernetes-cluster-namespace ${SC_NAMESPACE_01} --tanzu-kubernetes-cluster-name tkc-fluentbit
    

    Expected:

    Logged in successfully. 
    You have access to the following contexts:
    ${SC_API_VIP}
    ${SC_NAMESPACE_01}
    tkc-fluentbit

  5. Install Tanzu Extension Prerequisites - Cert Manager

    kubectl apply -f ${TANZU_EXT_DIR}/cert-manager
    

    Expected:

     namespace/cert-manager created
     ...
     cert-manager-webhook created
     
  6. Install Tanzu Extension Prerequisites - Kapp Controller

    kubectl apply -f ${TANZU_EXT_DIR}/extensions/kapp-controller.yaml
    

    Expected:

     namespace/tkg-system created
     ...
     kapp-controller-cluster-role-binding created
     
  7. Install Tanzu Extension - FluentBit

    kubectl apply -f ${TANZU_EXT_DIR}/extensions/logging/fluent-bit/namespace-role.yaml
    

    Expected:

     namespace/tanzu-system-logging created
     ...
     fluent-bit-extension-cluster-rolebinding created
     
  8. Copy Splunk template values file for configuration

    cp ${TANZU_EXT_DIR}/extensions/logging/fluent-bit/splunk/fluent-bit-data-values.yaml.example fluent-bit-data-values.yaml
    

    Expected:

    File *fluent-bit-data-values.yaml* should be located in current directory
  9. Open fluent-bit-data-values.yaml in editor to configure Splunk. Enter splunk details

     logging:
     image:
         repository: projects.registry.vmware.com/tkg
     tkg:
     instance_name: "kc-fluentbit"
     cluster_name: "kc-fluentbit"
     fluent_bit:
     output_plugin: "splunk"
     syslog:
         host: "${SPLUNK_IP}"
         port: "${SPLUNK_PORT}"
         token: "${SPLUNK_TOKEN}"
      
  10. Create a Fluent Bit secret with data values for Splunk

    kubectl create secret generic fluent-bit-data-values --from-file=values.yaml=fluent-bit-data-values.yaml -n tanzu-system-logging
    

    Expected:

    secret/fluent-bit-data-values created
  11. Deploy FluentBit

    kubectl apply -f ${TANZU_EXT_DIR}/extensions/logging/fluent-bit/fluent-bit-extension.yaml
    

    Expected:

    app.kappctrl.k14s.io/fluent-bit created
  12. Check the status of the Fluent Bit app

    kubectl get app fluent-bit -n tanzu-system-logging
    

    Expected:

    NAME         DESCRIPTION   SINCE-DEPLOY   AGE
    fluent-bit   Reconciling   19s            22s
    
    NAME         DESCRIPTION           SINCE-DEPLOY   AGE
    fluent-bit   Reconcile succeeded   4s             25s
    
  13. View detailed status on the app

    kubectl get app fluent-bit -n tanzu-system-logging -o yaml
    

    Expected:

    apiVersion: kappctrl.k14s.io/v1alpha1
    kind: App
    metadata:
    ...
    status:
    conditions:
    - status: "True"
        type: ReconcileSucceeded
    ...
    
  14. Verify the Fluent Bit DeamonSet

    kubectl get daemonsets -n tanzu-system-logging
    

    Expected:

    NAME         DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
    fluent-bit   2         2         2       2            2                     116s
    
  15. Clean up after workshop

    kubectl vsphere login --vsphere-username ${SC_ADMIN_NAME} --server=https://${SC_API_VIP} --insecure-skip-tls-verify --tanzu-kubernetes-cluster-namespace ${SC_NAMESPACE_01}
    

    Expected:

    Logged in successfully. 
    You have access to the following contexts:
    ${SC_API_VIP}
    ${SC_NAMESPACE_01}

    Delete tkc-fluentbit Cluster

    kubectl delete tkc tkc-fluentbit
    

    Expected:

    tanzukubernetescluster.run.tanzu.vmware.com "tkc-fluentbit" deleted
    


Status Pass/Fail

  • [ ] Pass
  • [ ] Fail

Return to Test Cases Inventory