So hi everybody. Thank you so much for joining us today and many thanks to kubecon and cloud native con for having us We're really excited to be here In our session today, we're going to be covering an introduction to kubernetes get ops and observability We're going to start out with a few introductory slides before moving on to the hands-on tutorial portion of our session today I'd like to kindly ask you to ask questions in chat And we will be having a dedicated Q&A session following the workshop And to get us started, I'd like to invite Joaquin to introduce himself briefly. Hey, everybody My name is Joaquin Rodriguez. I work for Microsoft on their commercial software engineering. I I guess help customers with kubernetes and open source Happy to be here. I'm based in Austin, Texas Yeah, again, thanks for having us And I'm Tiffany Wang. I'm a solutions architect on the customer success team at we've works and Immersionally from Southern California, and I'm now based in London and like Joaquin I work with customers to streamline delivery and deployment to kubernetes clusters both on-premise and in public cloud following get ops So before we continue on with the introductory slides, I'd like to invite you all to register for the hands-on section of our session today If you could please navigate to htvps Cube 101.dev the username and password are displayed on the screen and Hopefully it might be available somewhere in chat but if it's helpful the username is cube and the password is capital V at symbol Lensia 22 exclamation point and Once you've Conducted the basic off to the registration page. You'll need to register with your github username once you've registered you should check your email for a Email invitation to the kubernetes 101 github org We'll be using the cube con 2022 repository For our github code spaces, which is where we're going to be conducting the workshop today so take a minute to take note of the username and password and I will be moving on from this slide But we have a wonderful moderator that hopefully you've got the username and password. Awesome. Great So while I give you a few minutes to do that, I'll begin with an introduction to kubernetes Since you're all here at cube con this is information that you probably already know but we can start from the very beginning and Talk about how kubernetes is an open-source cloud native computing foundation project for container orchestration It was initially created at Google and now it is maintained by cncf Kubernetes allows you to define a declarative configuration to manage containerized workloads and services and kubernetes kubernetes is cloud native It's highly distributed resilient to infrastructure failure and outages enables frequent releases and It provides automatic automation and observability Self-healing and horizontal scaling service discovery and load balancing and it is scalable It's capable of running on-premises and in public cloud or a mix of both so you can have a Similar deployment experience regardless of target cloud cloud provider On this slide there are a bunch of components, but these components are what allows your kubernetes clusters to work on the left hand side, you'll see the control plane elements and The control plane elements typically run on control plane nodes The control plane components include the API server which allows users to interact with kubernetes API server And it validates and configures data for kubernetes objects We also have the controller manager which manages processes for nodes jobs endpoints and many others We also have at CD which is the backing store for your clusters state We have the scheduler which determines where workloads should run in your cluster And we also have an additional cloud controller manager which handles any cloud provider specific logic on The right we have three working nodes and working nodes are typically where your workloads will get scheduled to run Some key components of the nodes include the kubernetes which manages containers created by kubernetes As well as make sure that if they your containers run in pods and that they come up successfully We also have the cube proxy Which manages the network rules for your internal and external communications for your cluster We'll go into a little more detail about kubernetes resources and the kubernetes API server to understand how kubernetes resources are grouped and managed There are a lot of kubernetes resources and they're grouped by their primary function As an example, we have groups that manage that include role-based access control resources Scheduling admission registration auto-scaling events and many more But today in our workshop, we're going to be focusing on the core API group objects That is resources in the core and apps API groups Some of these resources include namespaces deployments services secrets and the API server allows us to create read update and destroy these resources You can extend the kubernetes API by defining custom resource definitions, which kubernetes controllers know how to interact with We're going to be using flux in our workshop today, and that's a great way to explain and see one in action It's really important to understand that all of the kubernetes resources are declaratively defined using yaml The declarative definition of resources helps to simplify some of the complex processes that happen within the cluster so how do all of these work resources work together and Eventually express an application that end users will use This slide highlights some of the components and we can actually start from the innermost part, which is the container Now a container is an immutable copy of your application code and all of its dependencies and It runs within a pod A pod is the smallest deployable unit in kubernetes and it can include one or multiple containers Containers within a pod share a network namespace and the pod is ephemeral It's assigned an IP and you can add metadata to it like labels While you can technically deploy a pod by itself It's recommended that you instead define a deployment or if you're running staple workloads a staple set And a deployment allows you to specify the number of replicas that you'd like to have running in your cluster Now if you have a deployment with n number of pods each with its own IP You can define a service that maps to the deployment The service then gets a virtual IP It's mapped to endpoints via labels and it is also named in DNS The service and the deployment both run within a namespace which itself is another kubernetes resource Namespaces provide an opportunity to logically group your resources So kubernetes does a lot of the heavy lifting when it comes to creating your resources and scheduling them, but There are a lot of resources to manage especially in a you know, microservice architecture and we need a way to reproduce what we've deployed to our clusters and We need to also understand conclusively what it is that should be running in our cluster and for this we look to get ops on This page are the open get ops principles that are or rather the get ops principles that are managed by the open get ops group This is an open group. So if you're interested in becoming more involved We invite you to join Get ops builds on dev ops and infrastructure as code by and by adhering to these principles You're able to empower developers by improving productivity improving stability and reliability and enforcing consistency and security The get ops principles then require that one your entire system state is declaratively defined to Your desired state should be stored and versioned and immutable Get lends itself really well to this and also allows developers to stay in the workflows that they know best three software agents like flux should continuously pull from the desired state and for Software agents should continuously reconcile The conscience of the desired state to your running cluster So if you're new to get ops and you are thinking about all the benefits that it can bring And you're wondering if you have to scrap everything it is that you've built so far and the answer is absolutely not On the left-hand side, you'll see a continuous integration workflow that starts with a developer writing application code Subsequently building and testing that code and the CI workflow culminates in an immutable Artifact whether that's an image or a helm chart and then on the right-hand side We have the Kubernetes and get ops workflow This is also centered around get but this time for your just Clarity of lead defined desired state Get ops allows you to streamline deployments to your clusters Observability within your cluster and operations for your cluster If you treat get as your single source of truth then any changes that you seek to make to your cluster should be made via via pull request and This allows you to easily see the difference between what's running in your cluster and what you're defining as desired state and Software agents like flux automatically reconcile the two This gives you an inherent audit trail and You'll know exactly who made what change when and if the commit messages are good also why Get offs also allows you to Easily roll back to last known good state It's as easy as a revert or a fixed forward commit So we've actually coined the term get ops And today technology has advanced to the point where it's no it's not required that you use get but some other source control versioning system But that is where the term came from So get ops is the practice of using get to store declaratively defined desired state and Continuous delivery agents like flux to automate the reconciliation of current state to desired state With get ops CI and CD are effectively decoupled So get ops itself is agnostic to tooling but in today's workshop. We're going to be using flux which is an open source CNCF project created at Weaver's and Flux's runtime is comprised of several Kubernetes controllers as well as their corresponding CRDs Today, we're going to be focusing on the source controller and the customized controller The flux source controller interacts with custom resources like get repositories buckets Helm repositories and helm charts and in today's workshop. We're going to be focusing on the get repository a Flux get repository allows flux to know which repository it is you want it to monitor and pull from as well as the branch There are some additional fields that will be covering in the hands-on section of the workshop as well We're also going to be using the customized controller, which whose corresponding CRD is the customization And the customization custom resource allows you to tell flux the path within the specified get repository in our workshop today That flux should read pull resources from and reconcile to your running cluster Flux is able to keep your Kubernetes in sync with what you've defined in git And it automatically and continuously reconciles running state to desired state So now we've got Kubernetes that easily allows us to declaratively define our resources that comprise our applications And we've got GitOps to streamline the operation operations by which they get deployed to the cluster We need a way to easily understand the goings-on within the cluster and we can accomplish this with observability Monitoring and observability go hand-in-hand where observability is arguably the superset Observability allows you to inspect observe explore trace and create custom queries to understand how your system is performing With monitoring the metrics alerts and dashboards that you set up should be actionable There are a lot of tools that accomplish things like metrics logging and tracing but today we're going to be using Prometheus for metrics collection and Prometheus is an open-source CNCF project created by SoundCloud And it stores your metrics in a time series as time series data we're going to be using Grafana for Visualizing our metrics and Grafana was created by Grafana Labs Finally, we're going to be using fluent bit for log log and metrics processing and forwarding and fluent bit is under the fluent D umbrella created by troops treasure data And it is also a CNCF project So now that we've covered Kubernetes GitOps and observability Let's dive into the hands-on tutorial and see it all in action And I will hand over to walking to get us started So Yeah, so let's get started Like we mentioned before in order to if you choose to participate in the in the hands-on tutorial You need to join the GitHub org today We'll be using GitHub code spaces as our platform for development So if you wish to participate make sure you're part of the org The username and password in case for those who join late It's right here. Let me see if I can find it That's the username and password and you have to go to kube101.dev to Register you should get an email with an invitation and once you join you have access to code spaces Okay, so let's get started. So the first thing Sorry, what? Yeah, so the first thing that we're gonna do to get started You're gonna see a little green button up here called code and then you're gonna click on create code space on main Hopefully the Wi-Fi is it's nice right now. It's really poor Okay, so How many people have registered to the org successfully at least Okay, okay once I mean hopefully once this starts We should be good to go it's just like this first piece that you know, it is the wife has a little poor Hopefully we should be good Just by the show hands was anybody able to create a code space Okay, we have a few. Okay. That's awesome Well, I think Tiffany had a backup code space already open so I'm gonna just yeah And by the way, if you fall behind or if it takes a little while all the instructions are On there read me so don't worry about it like everything that we're gonna be showing it's all documented So don't stress about it if your code space doesn't load yet. So, okay, so this one is coming up Okay, so essentially we have a pre-built image for code spaces that We have everything that we need in there. So it's pretty cool because once you create your code space We're gonna have a K2D cluster. We can have all the deployment demos that we need We have some CLI tools already pre-installed. So it's kind of nice as a you know development environment This is not meant for production. We mostly use it for interloop development and testing and demos like like this So, okay, so it seems like it's coming up. So that's great Show of hands now for how many people have their code spaces up We're right there with the rest of you who haven't risen your hands yet Because the demo gods are not being friendly today The Wi-Fi gods the Wi-Fi gods, right? What about the other one? See which one comes up first Maybe we wait for this we can start by Going through the Read me or I was thinking I can Connect to my computer on hotspot and then just just do that Yeah, let me tell I'm gonna see if I can connect to my computer via the hotspot and see if that helps a little bit So, let me do that really quick. Give me one second. I apologize for the inconvenience Were you able to get it? No Wi-Fi is gone. It's really you don't have any Wi-Fi and I connect either here Okay, so should we do with plan B? Yeah, okay, so we Have somewhat of a contingency plan And hopefully Thank you all very much for your patience and we'll keep an eye on our code spaces Periodically, but we have Recorded a screen recording Of what it should look like if we had Wi-Fi Um, but once you get back to your hotel and you log in you should be able to do all this You know, we tested it like so many times. So it's just the Wi-Fi, okay And all of the commands are included in the read me along with some descriptions of the significance of each step so Bear with us. We're going to be playing the recording and pausing as Required for us to explain some of what's happening Okay, so like I was saying I created the code space Typically takes like 45 seconds for the environment to get up and ready It's pulling an image and with this image image, like I said, you know it creates a Kubernetes cluster for us and it also gives us All the tools that we need out of the box, right? We have the yaml's for deploying the applications that we need We have some CLI tools What does it like flux for example? So, yes, it takes like 45 minutes or 45 seconds to Get started so you can see we don't want to the image the containers getting built and Now it got created Okay, so now see Yeah, okay, we have you turn it now. So this will work Let's test this really quick and hopefully I'm sure I'm on the internet, but I see this Okay Like we're in business Thank you guys. Thank you so much. And again, you'll be able to run this for yourselves You know back at your hotels or when the Wi-Fi is a little more stable And thanks again for your patience Okay, so now let's get started. All right, so It's like I was saying, you know, we created the code space And the first thing that like I wanted to show you is that here out of the box. We have a K3D cluster K3D is a lightweight single node Kubernetes cluster Essentially, it's a wrapper for K3S and it runs as a doc container. That's what which that's how we were running it And just out of the box if you run coop CTL Get all Get us to get all the resources and the dash capital a is meaning that we want to check our cross all namespaces So as you can see, we have different resources that are already created by default We don't have any of our resources which involves, you know Observability and floods and our custom application. That's not deployed yet. And that's what we're going to be doing first Likewise if I run coop CTL get pods I'm able to see all the pods Available on the cluster and is that too small? Should I zoom in a little bit or better, right? Okay So something that I want to note is that by I'm sorry That out of the box. We have some port forwards defined So these are defined you to click on their ports. You can see here We have you know, Prometheus and port 30,000 IMDB, Harpy, Grafana, etc So we have these out of the box that way whenever we want to connect to these services We're able to you know connect to them But right now since we have not deployed at the application yet. We're not able to connect to them yet So I just wanted to know that really quick But okay So let's get started. So the first thing that we're going to do we're going to deploy an application called IMDB IMDB Essentially, it's an application written in net. It's been containerized in an image and we're going to be deploying it to our Kubernetes cluster This application Essentially runs a in-memory movie database and it accepts different requests, right? Like you know get and pose, etc And we're going to be using that as our sample application for today's workshop So the first thing that we want to do to get this deployed we created a workshop manifest folder so we're going to see the into it and The first thing we're going to do is we're going to create a namespace So our resources and need a place to live so for that we have a namespace And like I noted here on the notes in Kubernetes namespace provides a mechanism for isolating groups of resources within a single cluster and Name of resources need to be unique within a namespace, but not across different namespace so In order to Oh, yes. Thank you.  Okay, so in order to create the namespace. We're gonna do cope CTL apply Dash f which the f is for you know for file and I'm gonna apply the zero one namespace And just like that you can see that our namespace was created And if I go if I just want to take a look at that YAML under the namespace YAML file It's very simple. All it is is hey Kubernetes I want you to create something of the kind namespace, and I want you to name it IMDB pretty straightforward And as you can see if I do coupe CTL Get an S. Oh, by the way For coupe CTL, there's a lot of different pronunciations for that. Some people say coupe cuddle or coupe control So you might hear a little bit of everything. I think Tiffany says coupe cuddle So I think there's like a YouTube video out there that talks about all the pronunciations So it's it's kind of funny. But anyway, so just want to mention that Okay, so now To deploy our application. We're gonna use a deployment file Right and essentially this deployment file. Let me show you how it looks like So like I said, you know, it's the kind deployment we want to create this deployment in our IMDB namespace and Disdeployment is gonna reference this image right now. We're using github container registry But you can reference any container registry that you like another popular one is docker hub We're gonna pass in a few arguments to our application You know, we're saying that we wanted to run in memory and we're passing in the zone in the region Which is this case is dev We're also passing in what port we want the container to run on in this case of say 80 some probes to make sure that the application is up and healthy and Also some resource limits for that container so To deploy that we do it exactly the same way. So we do coupe CTL apply that chef to Deploy so as you can see right away our application was our deployment was created and We can verify that by doing coupe CTL Get pods dash and IMDB That's and means what namespace we are referencing. So in this case is IMDB And as you can see 20 seconds ago, we have a part of the name IMDB that was was created Okay, cool. So our app is up and running is created. Okay. Well, so then let's let's access it, right? So let's call this Endpoint I'm using HTT PI HTTP PI Which is an HTTP client you can use curl if you choose to we chose this one because it was just you know It's pretty easy to use and very human readable, but if you would choose to use curl you can do that as well So, okay, so let me copy paste this. Oh, by the way, if you get this message right here You say allow that way you can copy paste into the terminal Okay, so oh no it failed that we cannot access our application This is expected to fail. The reason being is we don't have Service right so in order in communities if you want to access your Application you need to define a service. So for service, there's different things that you can create One thing is you know, you can create a cluster IP You can create a node for you can create a load balancer in this case, we want to create a node port meaning that we want the Endpoint to be exposed in our current nodes IP address so In this case only have one node So we have nothing to worry about and let me show you how that looks like really quick so again, we have a service and It references the indb namespace and we're targeting the port 8080, but on the node port we're targeting port 380 So likewise we do CTL Apply dash f zero three service and Our service was created. So now the same way we test the endpoint We get a 200 so that's good so the we have access to our Application so now if I go to this link coral HTTP Essentially, it's just a VSCode extension that allows you to hit different endpoints But it's kind of useful if you want to test things So in this case, for example, like I want to see my Prometheus metrics. So if I just click on send requests You can see that you know the response here on the right or for example, if you want to query all our actors You can see here 50 cents is there Or like movies for example Okay, so it's working right that everything is good everything is great So so that's great Oh, and one last thing I know earlier I talked about poor forwarding. So We do have poor forwarding by default. So if I go under ports and if I click on IMDB app You see this little globe icon It's gonna create a poor forward for me automatically And I can access the swagger docs for that application I'm just gonna try it out And it's all good Thank you, okay, so again This is a very very Basic kubernetes deployment. I mean obviously there's a lot more to kubernetes than this. I mean we're at a conference of kubernetes But the goal here is to show you, you know, what's like the like the basic on how you do a deployment In a little bit Tiffany is gonna be talking about get ups on how we can scale this up, right? Imagine you don't have one app. What if you have hundred apps, right? What if you don't have one environment right now? It's just that right? What if you have pre-prod and prod and tests and What if you have a hundred clusters, right? So how can we scale this up? So Tiffany will be showing that in a little bit So the last thing I want to do I'm gonna clean up The deployments that I do the problem that I just did so the first thing I want to do is I'm gonna delete the service So Cops ETL delete service IMDb dash and IMDb Oh, did you mean delete? Yes, I meant delete Okay But the pot even though I delete the service the pot is still there So we need to you know, you might think okay Well, I need to delete the pot, right? Let me show you something right really quick So if I do Cops ETL delete pod and then I'm gonna copy paste my pod name dash and IMDb Again, I cannot type today. Sorry about that Okay So great our pot is deleted, right? So we might think okay. We're done. Our application has been deleted Well, that's not the case if I do Get pods You can see that a new pot was created 11 seconds ago This is because the pods are managed by the deployment, right? So the deployment it's making sure that you know, you have a pod Based on whatever description you have defined in your deployment. So if you leave if you delete the pod The deployment is gonna be created for you automatically So if you really want to delete the application then you have to delete delete the deployment. So I You can also do this Cops ETL delete Dash f and then you can reference the file name that you use to To deploy it, right? So I'm gonna do that Our application is deleted if I do Cops ETL get pods You're gonna see that the pod is being terminated Terminated and now it's gone Same way, I'm gonna delete the Name space Okay, so that's The first portion of this demo, you know, like I said, I walk you through how to do a manual deployment of Kubernetes Kubernetes application But I was gonna get pretty interesting. So now Tiffany is gonna show you how we can achieve something very similar Using get ops. So Tiffany saw yours. Thank you very much Joaquin And actually before we get started If you wouldn't mind Creating a branch For today's workshop, we're each going to be creating a branch that is unique to our username as well as it's appended with a Random set of characters at the end and we're going to check out that branch and push it up and we're going to Change directory back to the root of our repository Now flux has already been installed on your cluster And so you can do a check of the flux resources by running flux check The flux CLI has been included within the code space. So that's how we're able to use flux CLI commands Great. We're looking for all checks passing successfully And as Joaquin mentioned, you know You can absolutely deploy things manually to a kubernetes cluster, but when it comes to being able to reproduce the state of your cluster you need a way to Easily get back to your desired state And as Joaquin mentioned, we have some manifests that are already included in this repository Now flux has already been installed in the cluster And what this means is that the flux runtime components like the controllers the crd's are all up and running in the cluster However, we want flux. We want to point flux to our get repository our branch and a path within that get repository so we can do that very simply by Running the flux bootstrap get command and if you just copy and paste this block We'll give that a minute to run and I'll go through the significance of each of these arguments that you pass in the URL Signifies the URL of the get repository, which is in the kubernetes 101 organization the kubecon 2022 repository and We're passing it in the branch variable that we just exported in the previous set of commands We're specifying token auth and what this does is tell flux that we want to Use a github token and conduct basic auth to be able to allow flux to read from the specified get We're also passing in a path and this path is used in the flux customization Telling flux to add its installation manifests and the sync file to the designated path So great If you've run the bootstrap get command successfully we can next pull To get the latest contents from git and you'll see sorry from that flux made to The repository on our behalf and you'll see a few files that got added They include the GOTK components YAML the GOTK sync YAML and a customization YAML GOTK stands for a get ops toolkit And we'll go into more depth about each one of those files in just a minute Aha, so there's lots that has been going on but the latest two commits on my branch that you can see are Flux adding the component manifests as well as the flux sync manifests so Now what we can do is take a look at the flux resources that got created for us and We can do that by getting flux get all and by default the namespace is flux system For resources and other namespaces you can pass in the namespace argument So we see that we have two Flux resources the git repository and the customization You'll see that the revision includes the name of your branch as well as the latest commit on your branch so 3b5c 3b5c and more And we can see that both the git repository and the customization are reporting as ready in the read me I've added some Comments to explain How the values got passed in to create the git repository and customization pair that lets flux know Look in this repository and this path within this repository So that's great. We have a flux Set up and we've pulled down at the latest Commits that flux made to our repository And the geotk components includes all of the flux runtime resources and the geotk sync Includes the git repository and customization and there is also a customization YAML and I want to point out that this is not a flux customization resource This is a customized overlay And Aziz name suggests the customized controller works with customize, which is a configuration customization tool native to kubernetes as of 114 that allows you to do some That allows you to keep your repositories very dry And if you're just using plain kubernetes manifests like we are today the customized controller will add a customization YAML by default and this is slow to load Yeah, so I'm just going to use this so Now that we have flux pointed at this repository You might have noticed that the path was very specific to the deploy slash bootstrap directory Now this means that flux is only monitoring this repository right now But we have other resources that we'd like to deploy to our cluster including the contents of the application directory and the contents of the observability directory So what we can do is create a flux customization to tell flux to monitor and Pull resources and reconcile those resources from our deploy slash application and deploy slash observability directories We can very easily just Run this command and flux will create the customization and begin the reconciliation process We want to conduct we want to make sure that we're adhering to get-offs principles So instead what we're going to do is export the contents of that customization And in a second here we go We've now created a customization resource Placed it in the repos in the location that flux is already monitoring And so what we can do is simply add commit and push our latest change great So right now the sync interval that we've set on the git repository is set to one minute and The customization sync interval is set to 10 minutes We can trigger an automatic reconciliation using the flux CLI and we can do something like flux reconcile source git and Subsequently running a flux reconcile reconcile on the customization Great, so these are showing as successful and what we can do is take a look to see how the customization that we've just added is doing and this This Unready customization is actually an indication of success in our part on in For this purpose and this is telling you that the application customization is failing because the observability Customization is not ready If you look closely In the application customization we've added a field called depends on Now this depends on a field Tells the customized controller not to reconcile the contents of this customization until the dependency is ready So in this way flux natively supports ordered installation of manifests so let's go ahead and add the Observability customization in In the same exact way that we did for the application one this time we don't have it depends on we're just going to Add commit and push the observability customization Great now Previously we did a reconciliation of both the source and the sorry the the git repository and the customization But you can do both in one command by passing in the with source argument So what this will do is first reconcile the source so tells this tells flux to pull the latest contents from the source Repository and then subsequently to reconcile the customization So I might have taken too long and flux might have beaten me to it Okay, so if I had been a little bit quicker you would have seen For about a minute or so that the application one might have reported as Unready because the observability would have taken a little bit to come up But we can see now that the observability and application Customizations have both successfully reconciled So it's great that these flux resources are reporting as ready But what does this actually look like within the cluster and what have we deployed in the first part of these this workshop? Joaquin deployed a deployment for the IMDB application And he also deployed a service This IMDB YAML includes both the deployment and the service And we also have a web v heartbeat heartbeat and web v Deployment which allows us to run low tests later on in the workshop We've also deployed the observability stack including fluent bit Grafana and Prometheus And all of the resources that it takes to Deploy and configure your observability stack are expressed declaratively including your Grafana dashboards Which are stored in config maps So Now what we can do is take a look at all of the resources Within the cluster now and we'd expect to see some resources running in the logging namespace the monitoring name space the IMD IMDB namespace and Did I say monitoring already? The heartbeat namespace as well. So all of our resources are up and running second so we've verified that we have all of our pods up and running and Flux is also capable of detecting drift between what you've defined as your desired state and get and the running cluster So we saw that if you deleted a pod the deployment would bring it back And Kubernetes would do that by default We also saw that if you deleted a deployment the pod would no longer come back So what we've done now is pointed flux to a repository that includes that deployment definition So what we can do is run a kubectl delete deployment for our IMDB Deployment and We can put a watch on getting the deployment now this can take a few seconds But effectively what we what we will see Is the fact that flux is going to bring back the deployment on its next reconciliation loop? Great, so we see that it's coming up now And in a few minutes up well not minutes. It's there We see that one out of one containers are ready for the IMDB application We can further verify by taking a look at the pods great So flux also detects drift within the resources that you've defined in git so this command here is going to describe the deployment that we've defined in git and Just to show you the replicas field Sorry, we have specified that we want one pod running for the IMDB deployment and we can show you I can show you that here as well great so What we can do is manually edit this deployment and we can do that several different ways If you want to follow along with the workshop you can export a cube editor environment variable and by pasting that in we can specify that we want to edit in VS code We can subsequently run a cube cuddle edit command and that will bring up the existing resource And you can edit this file and as long as the valid Sorry as long as the yaml is valid it should save and automatically apply that change Great, so I'll be quick here because I'm competing with flux now awesome. So we see that the replicas has been updated to two and Great, we can see that we have two pods running Which is what we've manually edited the deployment to show now Once we wait about a minute or so what flux should do is reckon is Realize that the replica count in the deployment no longer matches what you've defined as your desired state And so you can see now that the second pod is now being terminated now has been terminated and we can take a look at the pods Within the IMDB namespace great. We see one We hit up arrow a few times we can see that the replica Field within the deployment has also been changed back by flux so Yeah Flux now we've deployed the sample application the observability stack as well as Checked out some of flux drift detection and reconciliation capabilities, and I'll hand over to Joaquin for the Observability section. Thank you Okay, so Tiffany already got the applications deployed One way to verify, you know deployments and everything. It's the one of my favorite tools is Canines so essentially canines is a UI Tool that runs in the terminal and it allows you to inspect and you know see what's going on with different Kubernetes resources so In order to get started with canines all you have to do is just type canines on your command line And if you press 0 you're gonna see all the namespaces So as you can see here, we have different pods across all namespaces and The first thing I'm gonna do is I want to check this Wet v heartbeat if you press L It's gonna pull out the the logs. So as you can see that it's making a request around every five seconds and likewise I can open up my Wet vimdb pod and if I press L you can see that it's sending around 10 requests per per second, right? Likewise on canines, you can see different types of resources not just pods, right? If I do Shift colon and if I just type for example Deployment You can see that we have all these deployments already in the cluster I can do let's see secret for example Different secrets are defined Etc. So pretty useful tool Highly recommend I'd be especially if you need to Kubernetes It you know, it's it's great now the first Component that I want to show is fluent bit, right? So fluent bit It's a log processor and forwarder that allows you to collect log events from different sources and Deliver them to different and backends, right? So For this example, it's essentially we're collecting logs from our application But we're not really forwarding to any cloud provider right now We're just pushing it to standard out just for the terms of simplicity But should you choose to there's different connectors that you can use in fluent bit in order to push, you know Your logs to you know, you know, Azure Google, etc Should you choose to? So all I wanted to really show from Fluent bit let me go to pods and If I just go under Fluent bit and if I press L and then I can do let's see w or For the for the wrap and as you can see like all these logs are the ones that are getting printed to standard out Like I said, you can configure it the way whatever way you choose to whatever provider you want to use as well Now the next thing and that is actually pretty cool that I want to show is Prometheus select Tiffany mentioned on the slides Prometheus is a metrics collection and alerting tool It records real-time metrics in a time series database and it's built using an HTTP pool model Right. So as part of Tiffany's demo, she already deployed Prometheus So I can show you that we have it right here. The pod is running and I'm able to access the Prometheus UI if I click on ports Prometheus you see the little globe icon here and we're gonna port forward to our Prometheus UI Coming up coming up. Let me try again Great. Oh, we saw that last time. Yeah, let's refresh a little quick. Oh not this the Prometheus tab Interesting. Are we losing Wi-Fi? I mean we're plugged in now. I mean, let's see Okay, I'm gonna refresh my code space really quick. Prometheus. Okay, it's not showing Yeah, try it. Oh, it's running Just thinking out of curiosity is anybody was it anybody able to start up their code space and cool Okay, that's awesome. It's in the same program Okay, so must be something. Yeah, I don't know why it's timing. Let me try it again one more time. Yep. Yeah Okay, there you go. Prometheus is here. Awesome. Okay, so this is how the Prometheus UI looks like I'm not gonna go too much detail given the time now, but a few things that I want to show So if I you go under status and then targets It will show you what targets Prometheus is currently scraping So for example like our imdb app that we show before it has a Metrics endpoint. So this is one of them that you know, Prometheus is scraping and you can see the status set to up And then as well we have some for our low testing which is like the web v Applications so everything seems to be good So if I go back to the main UI and you see this little icon right here If you just press there, it will show you what are the metrics that Prometheus has been able to scrape for us And it's stored in the database. So For example this one You know it shows there So yeah, so we have the metrics cool, but we want to make it pretty we want to be able to make it more like user friendly right so for that we have a grafana and Grafana it's an open-source observability platform that allows you to visualize metrics logs and traces from your application so So yeah, so you open the grafana port and the username password is admin and Then coop con 101. It's also in there in the read me. So I'm already logged in. This is a grafana The first thing I want to show you if you go under the little Gearbox gear tool icon and then press data sources So Grafana can connect to many different data sources For this case right now, we're just connecting to Prometheus, but I just wanted to show you that You have the capability of connecting to so many things. You can connect to elastic search, you know Grafana temple Asher monitor is there Grafana cloud, etc So there's so many options so many so many things out there. There's so many plugins out there that you can use For today's demo. We're just focusing on Prometheus, but I just wanted to like I mentioned that This exists right and you can play with it. Should you choose to so okay? So we have a Prometheus data source It's pointed to our Prometheus service If I click on save on tests, we know that everything is connected as expected And now if I go here, you can see that we have a dashboard for our imdb application which keeps track of what how many requests per second are coming into our application and Also, how long the requests are taking and if there's any errors at the moment So right now we have no errors and the request seem to be pretty constant Okay, great So now we're gonna load. Oh, we're gonna run a load test So that we can see some some action here in Grafana So to do that we have some already pre-made tools to load Our load test you don't have to worry about too much about what it does in the background But all you have to do is just run this KIC which stands for Kubernetes and code spaces Test load. Let me quit from here And I want to run a few integration tests. Actually, I'm gonna run them all at once And the reason being is I want things to fail on purpose. That way we can see some of those errors and In Grafana, right? Somebody's gonna run it a few times. I'm gonna hit it a few more times So, okay So now if I go back to Grafana, you can see that our load starts to go up Right. We have more requests coming in per per second And then in a little bit just give it a few seconds. Oh, there you go You're gonna start seeing that we have some errors in our endpoints as we expected you can see that the Request per second also went up. Now we're in an orange So, yeah, so very useful very valuable you can do so many things with it Maybe you haven't used Grafana. I you know, we highly recommend it Okay, so I think that's it in terms of Demo if you have a code space still running you can stop it by pressing this little code space button down here, and then you can see Stop current code space We're gonna leave this axis open for you know, maybe like another few days because I know not everybody was able to get The access today that way you can test this back at your hotel or back at home But that being said I want to turn it back to Tiffany who's gonna show us some sites right, so unfortunately only a handful of you were able to you know conduct the hands-on portion alongside with us, but Today, we've covered Kubernetes get ops and observability We've deployed a sample application via flux in our Kubernetes cluster As well as the observability stack following a get ops workflow we've also monitored that sample application and even ransom integration and low tests to simulate application use and success successful and failed traffic We Have just a few minutes and I'll just Mentioned very briefly that Joaquin and I will be here for the rest of cube con cloud native con And you can find us at several booths Including the Microsoft Azure booth There's a flux booth as well and a we've worked spoof And in this deck we've included some additional resources for the topics that we've covered today So just wanted to get that out of the way so that we can use the rest of the time for any questions that might have been asked Yeah, sounds good. Can we take a selfie really quick? Yeah, are you okay if we take a selfie? Yeah, let's do it really quick Okay, cool. So let's do the Q&A then Q&A I think that there will be a microphone that will get placed in the center aisle if you had any questions and And thank you all again so much for your patience Really appreciate it. Yes, there's a microphone back there. Oh, sorry Shall I shall I stay here or whatever you're comfortable? Okay. I have a question regarding the flex. What's the similarity between helm and flex That's a great question And helm is actually a great templating tool. That's you know cloud native and allows you to package up all of your resources so Flux and helm are Different I would say helm does include some CLI commands that allow you to you know do things like helm install helm upgrade, you know, etc but what flux Adds to that is the ability to declaratively Define helm resources that live and get that the flux helm controller manages so I Might have mentioned during the talk that the customized controller is one of fluxes reconciler controllers and fluxes helm controller is the other Reconciler controller and it interacts with a helm release which defines a helm chart from a helm Repository that flux then uses To do something to do, you know installations and upgrades But instead of you having to manually call helm install or helm upgrade You just add it to get make sure that it's in a repository that flux is monitoring and flux can perform the installations and upgrades on your behalf and You can define values either within the helm release So some so similarly to passing in a values YAML to any helm commands or you know setting any values And you can define those within the helm release itself or Externally in a config map that you subsequently feed into the helm release. Does that answer your question? Yes So in other words, it's like a formation between repository and deployment process. So it's like another layer over the Helm right, so just the link between git or repository and the deployment process in the Grantus. Yep. Okay. Thank you very much. Thank you Would you mind passing the microphone? Thank you so much for a great demo. Thank you. I'm having all the patience and it's all the Wi-Fi issues. I Have two questions One, how do you manage your secrets? We have an issue with continuous Cycling of tokens and managing it. How do you manage secrets? Second, what other competitive products exist or equivalent for flux like in the in the same Space as flux water does. Thank you. Yep. So secrets is a great question and I Mentioned I mean and one of the GitOps principles is that all of your all of the things that you intend to deploy to your Cluster should be defined in Git. However, Kubernetes secrets are, you know, only base 64 encoded and effectively plain text So in that case, there are a lot of different options for secrets management if you You know are looking at Like open-source tooling, there's the sealed secrets controller Which which includes a an encryption key that it only lives within the Secrets sealed secrets controller. So if you store the secret in Git It's it's no longer a plain text secret effectively You can also use and flux now natively supports vault integration as well as SOPS So those are some other options and I believe that your third your second question was other options Apart from flux and I did mention that GitOps itself is agnostic to tooling and so there's a Few others that are available and I think that you'll be able to find some talks on those as well at Kubecon so would invite you to appreciate if you can name few so that I can go and read about those Got it Argo comes to mind Yeah, Argo with the HelloFresh and blocks Yeah What other ones are out there? Yeah, sorry, I didn't come prepared with the list of alternatives apologies Thank you so much. Thank you. Yeah I will just briefly ask Since you mentioned Argo, which is another Continuous delivery tool for GitOps as well. So Although I'm not experienced with it. So I want to ask that What do you find the key differences between flux and Argo or what strings do you find in Flux that you might want to choose over Argo CD? Yeah, that's a great question and I will be the first to admit that I am not, you know Supremely well-versed in Argo, but from Flux's perspective Some of the benefits include the fact that it leverages a lot of native Kubernetes functionality Include including things like role-based access control and Flux natively supports multi-tenancy within a cluster And while the Flux reconciler can while Flux might have widespread access within your cluster you can specify that when Flux is reconciling contents of a customization perhaps from a you know an application team's repository you can lock it down by defining Roles or and role bindings to attach the service account for that Application team shall we say and what that will allow Flux to do is only Deploy and reconcile resources that are allowed in the RBAC rules You can similarly define a cluster role and cluster role binding if there are clusters go for resources that That application team might need to deploy And Flux also scales really well and is able to manage I don't know. Yeah, there'll be vendors for both Flux and Argo the boots right so you can always ask more questions. Yeah Exactly the similarities and differences. Yeah, so yeah Yes, please feel free to come find us at the boots and happy to chat further. Thank you Are there any other questions in the back there? Thank you Hi, thank you so much for the talk My quick question was around monitoring and observability. I know that's not the point of this talk But I want to get your thoughts around Using the open source to her tools like Prometheus versus like third-party tools Maybe like data dog and other such I'm wondering what your thoughts around like, you know The pros of using the native open source tools versus others Well How deep are your pockets? I only say that as a joke, but I would say that if you're beginning, you know testing out and Figuring out what metrics it is you're interested in collecting as well as carving out, you know and and creating specific alerting around specific metrics and gathering information about the General performance of your cluster open source is a really great way to start And I know that you I think you mentioned data dog There are a lot of additional capabilities that you can have vendor support for But I would say that the open source community is Quite generous with their knowledge and you'll find a lot of examples and and Like resources resources online as well. So they are battle tested if that makes sense Thank you. Thank you So Yes quick That KAC load test tool is that something you created yourself?  I think it's under the dot KIC directory. I think that got refactored. Oh it got refactored Yeah, but you want to contact me? I can you know, I can point you in that direction. Yeah, yeah, thanks I guess this isn't the last opportunity to chat with us Thank you again so much for your patience and for joining our session today. Thank you


And so everybody talks about freedom and not to have a, to have a shot or have a test. Well, guess what? And so how about patriotism? How about making sure that you're vaccinated so you do not spread the disease to anybody else? What is Joe Biden talking about? According to the CDC, a vaccinated person can still spread the coronavirus, but Biden wasn't done stepping on rakes. After lying about what the vaccine can actually do, he then goes on to say this. How about making sure that you're vaccinated so you do not spread the disease to anybody else? What about that? What's the big deal? Yeah, what's the big deal about giving up freedom over your body for a vaccine that the president is lying about?


Lecture 13, As-Salaam-Alaikum. Welcome to the Virtual University's course on Business and Technical Communication. In today's lecture, we will look at how to compose business messages. Previously, we have looked at the planning of business messages and today we will identify the characteristics of a well-organized message, explain why organization is important to both the audience and the communicator and also break a main idea into subdivisions, grouped under logical categories. We will also learn to arrange ideas in direct or indirect order depending on the audience's possible reaction. We will learn to compose a message using a style and tone that is appropriate to your subject, purpose, audience and format. You will also learn to use the U article to interest the audience in your message. Then we talk about organizing the message. Basically, what you need to keep in mind is that people simply do not remember disassociated facts and figures. Successful communicators, however, rely on organization to make their message meaningful because obviously if they are facts and figures which are not associated, which are not, which do not have any connections between them, they will be difficult to remember. So, good communicators, good writers, writing business messages rely on good and effective organization to make their messages meaningful. What exactly do we mean by good organization? I just said that good communicators rely on good organization. So, what is good organization? Most disorganized communication suffers from the problems with content, grouping and sequence. If you want organization to be good, then you have to keep in mind that content, grouping and sequence of ideas should be effective and it should be such that the communication becomes easy to read and comprehend. Also, main problems that writers normally face with organization are those of including irrelevant material. You need to keep in mind that you should not introduce information that does not have any purpose. All information that is included in a business message should have some purpose for being there. Also, a lot of the times people get their ideas mixed up. The ideas whatever it is that you are stating should be in its right place. It should be within a context and it should come in a logical sequence. Sequence should be followed in which ideas built upon previous ideas. Ideas should not be introduced when they have not been talked about early or where they should not be introduced in a way that the audience is expected to know about them when they have not been introduced properly. So, they should be built upon previous ideas. Another main problem is that of leaving out necessary information. Many business communications, business messages suffer from this organizational problem where necessary information, essential information is left out. The prime focus should include the information that is required by the reader. We keep talking about the audience and reader centered approach and that is, this is one of the main considerations that the information that is required by the reader should be present in the communication. Leaving out the reader's desired information would be highly undesirable. Obviously, if a reader is reading a communication because they are expecting something out of it and you as a writer fail to provide that necessary information, then that communication loses its purpose. What does good organization mean? It basically means that the subject and purpose are clear. All information that is within that communication is related to that subject and purpose. Your subject and purpose is clear. All information that is included in that message is related to that subject and purpose. Also, it is good organization means that the ideas are grouped together and presented in a logical sequence, in a logical manner. The ideas are related to each other. The sequence of ideas that is presented first, the next idea, or the information that comes after it, is also a logical sequence of why this idea is connected to this information. And also, all necessary information should be included. Good organization is important because it helps in making the message more effective. Now, why is good information important? Why is it necessary that you have to put information in a certain way? Why can't you just put information in any way you like and leave it up to the reader to find what they need? Basically, it is important to arrange ideas in a logical and diplomatic way so that you can satisfy the audience's needs, the reader's needs so that they can find what they are looking for more effectively, more efficiently and be satisfied. This way, your message will be understood better and it will be more effective. If the purpose of your message is for the reader to act upon it, it will be more likely that they will act upon it immediately. You need to help your audience understand your message. It is your responsibility as a writer to make sure that your audience understands the message. It is not the reader's responsibility. So, the main reason for being organized is to improve your chances that people will understand clearly what you mean. Good organization also helps you to get your ideas across without upsetting the audience. They don't feel frustrated because the message is unclear, because the message is embedded somewhere. If your message is organized well, then your ideas get across better. Good organization also helps motivate the audience to accept your message. As I said earlier, whatever message you have written, if it is a good organization, it is the way that the reader can easily understand everything. So, the chances increase that whatever you have requested or whatever message you have received, they can accept it. You need to also save your audience's time. You need to write your messages in a way that you can understand the message in less time. This is how you have to write your message. Well organized messages are efficient. They only contain relevant information. So, the audience does not waste time in superfluous or extra information. Well organized messages do not have unnecessary information. Whatever information is in a good message, it is to the point and it is to the point that the reader needs it so that the reader does not waste time. You also need to simplify your communication tasks. So, basically this means that being well organized helps you compose your message more quickly and efficiently so that your communication task becomes simpler. It is not easy for you to write, it is not easy for the reader to read. Organizing what you are going to say before you start to write makes this job much, much easier. You have already organized what you are going to write and then you will start writing. Then your message will be more efficient and to the point. Your audience will also save time. Your communication task will become simpler. Now, how is good organization achieved? We have just talked about how the fact that your messages should be organized well. How is that organization achieved? In the end, how will you write that your message is organized? To organize a message, first group the ideas together. Which are the same ideas or the same things and keep them together. And then put them in sequence. Then put them in order of importance. Or if you want to do this sequence whatever sequence you will establish then write them in that sequence. But the related ideas should be together. In business, deciding what to say is more important than deciding how to say it. If you have a very nice format, you have decided how your message is going to go out but if the content what is going to go in the message is unclear then your business message becomes completely ineffective. Let's talk about defining and grouping ideas. I just said that one main way of organizing your message is to define and group ideas. What does that mean? Basically, an outline or a schematic diagram will help you visualize the relationship amongst the parts of a message. First, start with the main idea. State the major points. Illustrate your idea with some evidence. Whatever you want to talk about, what is the main idea? First, write the major points of that idea. And then if you want to give some evidence then write that. The main idea is the starting point for constructing an outline. What do you want your audience to do or think? And why should they do it? So basically, when you start off with writing you need to keep in mind what is the main idea that you are trying to get across. What is the purpose of writing this communication? What is the main idea? What do you want your audience to do or think? And why should they do it? If you want them to think this way or after reading your message, then why should they do it? So you have to get that clear in your mind before you can actually start making an outline for your communication. You need to state the main idea which should be supported by 3 to 5 major points. Whatever your main idea is you have to use some major points in support of it and they should not be more than 3 to 5. The breakdown of the main idea into major points and consequently major points into evidences is best represented by an organizational chart that we will see. As you can see here, there is always one main idea for a business message which is then broken down into 3 to 5 major points and then each major point has 1 or 2 evidences which will support that. It's important to illustrate with evidence because every major point that you have should have enough evidence so that the reader is convinced of whatever it is that you are saying as a writer but there shouldn't be too much evidence. There shouldn't be too much information related to the major point that it becomes boring. The other thing we talked about earlier we talked about grouping and we talked about sequence. Sequence is when you have when you decide what comes where what comes first, what comes afterwards. You have 2 options after you have defined and grouped your ideas. You can take the direct and then you can take the direct and then you can take the direct and then you can take the defined and grouped your ideas. You can take the direct approach or the indirect approach. The direct approach we call that the deductive approach as well. In the direct approach, you put main ideas first and then it's followed by evidence. In the deductive approach, you write the main idea and then the evidence comes afterwards. In contrast to this, in the indirect approach, you first put the evidence and then you put the main idea. This is called the inductive approach. The audience then needs to think a bit and then they find the main idea later on in the communication. To establish the sequence within a business message, you should use the direct order, the direct approach if the audience's reaction is likely to be positive and use the indirect order if it is likely to be negative. If you think that whatever news you are giving or whatever communication you are giving in your reaction, your favorite reaction will be positive and then you can take the direct approach. First you should tell your main idea but if you think that the reader will have a negative reaction from this communication then you take the inductive or indirect approach. First give your evidence and then write the main idea. Short messages follow one of four organizational patterns depending on the audience's probable reaction. They can be written as direct requests which means that direct requests are those which get straight to the point because the audience usually wants to respond. If the reader or writer feels that the audience will respond positively then the writer uses a direct request. They can be routine, good news and goodwill messages where the direct approach is effective for messages which will please the audience or which will cause no particular negative reaction. If you have a routine goodwill message then direct approach is used because the reader will like the message so you can write directly to the point. Let's have a look at a direct request format. The direct request letter will begin with the main idea. The midsection will make a request and provide essential details. In the closing the letter refers to the main point and states the desired action. As you have seen in a direct request the main idea or request that you want the reader to do or the main idea you write what the communication is about. In the second section you will request what you want and if there are any essential details you will give. If there is more than one action requested then you will tell. In the closing you will refer to the main idea and the desired action that you want to read you will tell. If you have ordered or requested then you will reiterate that we want this and you will also tell how long you should reach or what action you want. The routine good news and goodwill messages also follow a particular format. The good news will be very clear because the readers will be very happy. All necessary details are provided in the middle part. Anything that describes whatever the good news is goes in the second section. The third part is giving additional specifics if there are any and in the closing the letter refers to the main point and states the desired action again. If there has been a good news for example you have received an application from somebody and you have accepted that application you will start off by congratulating them saying that their application has been accepted they have been accepted for that current position, you will give the necessary details of that job, you will give any additional information that is needed maybe how to get to the company when they come to work and in the closing you will again state the main point and whatever desired action you require maybe remind the person the particular date and time on which they need to report to work. We will establish as we said sequence with organizational patterns and we have looked at two of them. Let's have a look at how you will phrase bad news messages. Till now we have seen when we will direct request if there is a message of bad news that the audience will not be happy with we will directly request it or not. If you have bad news basically you will try to put it in this message cushioned by other more positive ideas you will start off with something positive you will end on a positive note and you will put the bad news somewhere in the middle this is so that the audience, the reader does not have a very negative reaction to your message also because it is bad news you will try to make it soft and that is why you will cushion it as we say you will put it between positive language and positive content of your message. Let's have a look at a bad news a message format. This letter will begin with a neutral statement that provides a transmission to the refusal. There will be a neutral statement which will show the way towards refusal but there will be no immediate refusal. If someone has requested you then you will not refuse in the first line of your letter. You may write something like this. Thank you for your letter dated etc etc and then you will reach on the bad news that you are refusing their request. The mid section then explains the reasons for refusal and then states the bad news. So even before stating the bad news you will first give the reasons. You will maybe say due to unprecedented demand for this particular item we cannot supply you with the material that you requested. So you will say what the reason is and then give the bad news. You will not say we cannot supply you with the material you requested because there has been unprecedented demand for this because this means that you are giving the bad news first and then the reason. So you will write the reason and then you will tell the bad news. After this the writer should take care to introduce a positive thought. Maybe you can say something like however we have put your request in our waiting list or in our file and we will deal with it as soon as we get a new stock of the item that you have requested. So you are giving a positive note to the reader and then the letter will close on a cordial note. Maybe something like we look forward to doing business with you in the future or we look forward to hearing from you soon or we hope that we can satisfy your demand soon. Something which is cordial, something which is positive leaves the reader feeling comfortable and pleasant rather than leaving the reader feeling that my request has been rejected. The fourth type of message is the persuasive message. In this message using the indirect approach gives you an opportunity to get your message across to a skeptical or hostile audience. If the message is to persuade somebody then it is with the understanding that the reader is not already on your side. It is with the understanding that you are having to persuade the reader to change to your point of view or to accept what you are saying. So therefore it is better to use an indirect approach because that gives you time to convince the reader and that by the time you come to your point it is likely that the reader will start seeing things your way. If you say directly then first of all because the reader is not happy with your point of view and he is hostile towards you he will immediately reject your idea. If we talk directly then maybe the negative factor of the reader will decrease and until you write your main idea accept it. Let us have a look at a persuasive message format. This letter begins with questions to catch the reader's attention. It leads up to the main point by arousing the reader's interest and the third section gives the reader's motive for complying with the request. It basically talks about why it is that the reader should comply with the request. Reader will be able to accept this request and then it closes with an appeal. It also shows the closing then shows why it is important to the writer that the request is met. So where is the advice section? It will show that the reader's attention will be attracted. In the next section whatever is the main point, whatever you want to say, you will write it. Then you will write why you want the reader to take action and what is the benefit of reading it. Then you will appeal. Maybe it could just be something like looking forward from you. It shows an appeal, it shows that you are eager that the reader takes positive action to your request. For longer messages, the organization should reflect both the purpose of the message and the audience's probable reaction. When your purpose is to inform, the major points are based on a neutral order implied by the subject's characteristics. You don't have to think that I should write indirectly or directly because a natural order will come if you are just giving information. Maybe you will write the important points based on the important points that are less important later. Because you are not persuading or you are not giving good news or bad news, so you don't have to worry about the indirect format. Your audience may react in two ways to your material. If you expect your audience to agree with you, use a structure that focuses attention on conclusion. If you expect your audience to be skeptical about your conclusions, that focuses on the rationale that supports your point of view. If you feel that your audience will agree with you, then use a structure that focuses on the main conclusion of your message. If you feel that your audience is a little hesitant, because they are not agreeing or they are skeptical, then use a structure that focuses on the rationale that what is the benefit of your audience if you accept it. Why do you want this to be done so that until you reach the conclusion your audience will be persuaded. All that we talked about right now was the organization of your message. What you will do when you are thinking of how to put the points down. What will you do now when you are actually formulating your message, when you are actually putting things down on paper? You need to keep in mind in formulating your message, your first draft, your idea and then you will polish it up. So first you will write your idea and then in the next step you will polish it and improve it. When you are composing your message, you need to keep in mind your style and tone. The message varies in style to create a tone that suits the occasion. Depending on when you are giving out a message, why you are giving out a message and what the context is, you will change the style and the tone to suit that context. You need to think about the relationship you want to establish when you are formulating the message. This relationship is between you and your reader. You should not be too familiar because it is a business message. You do not want to be too friendly or show that it is a very informal message and you need to keep a business-like tone. That is why you will not be too familiar with it. If you are going to use humour, use it with great care, do not joke too much. If you want to add some fun elements in your communication, use it carefully. Do not flatter the other person. Do not praise him too much Do not preach.  Do not come across as a preacher. Do not brag. Do not show off. Do not talk too much. Finally, be yourself. Be natural even though you are being slightly formal, but be natural. Say what you want to say, but say it with tact and diplomacy. Another important element is the you attitude. This is important to get your message across favourably. The you attitude is best implemented by expressing your message in terms of the audience's interests and needs. The you attitude is to keep your audience's interest and needs in mind. Do not think of the future. However, you should avoid using you and yours too excessively. Also avoid using it when you are assigning blame. If you are writing a letter or pointing out a mistake, then do not use you or yours because it becomes too direct. Also if your organisation prefers a more formal style of writing, then also you will avoid using too much you and yours. For example, instead of saying to help us process this order, use something like so that your order can be filled promptly, please send another copy of the requisition. Now if you see in this example, the focus was on us, whereas in the second example, the focus is on you. Use the you attitude where you feel that it is positive where the reader is going to get a positive impact and a positive impression without feeling that they have too much responsibility or without feeling under pressure by that you article. And in another example, instead of saying we prefer typewriter ribbons in three odd colours, black, blue and green, in this sentence the stress is on we, what we prefer. Use something like take your pick of typewriter ribbons in three colours, black, blue and green. In this sentence, the emphasis is on the client, the customer, the reader, whoever it is that the communication is addressed to and it starts off with take your pick which gives emphasis on the reader. Remember however that the word you does not always indicate a you attitude and the you attitude can also be displayed without using the word you. It is not necessary that when you are using you you take care of the audience. For example, when you are blaming someone if you are using you, then you are not taking care of the feeling of the audience. Along with this, it is often that you can display but it is not necessary that you use the words you. For example, instead of saying you should never use that kind of paper in the machine, you can say that kind of paper doesn't work very well in the machine. In this, your attitude is that you are taking care of the reader instead of telling them in this tone that you are reprimanding or scolding them. You say that this is not good in the machine but obviously the concern is that the reader should not use it in the machine. Another example could be if you say something like you need to make sure the staff follows instructions. You can say it might be better to say the staff may need guidance in the following instructions. Here again, it seems less like an order and more like a proposal. You also need to emphasize the positive. Explain what you have done, what you can do and what you will do. Don't emphasize what you haven't done, what you can't do or what you won't do. What you can do or what you have done and what you can emphasize when you are offering criticism or advice, focus on what the person can do to improve. Don't focus on the negative aspects of that person but focus on what improvements can be made and how. Talk about solutions, not problems. For example, instead of saying the problem with this department is a failure to control costs, use something like the performance of this department can be improved by tightening up cost controls. Don't talk about problems but talk about solutions. You also need to establish credibility. Don't make false promises. Don't make promises in your business that you can't fulfill. Don't make claims that are not true. I feel I am more likely to react positively to your message when they have confidence in you. When they have an idea that what you are talking about is true or you are not making false promises and what you are saying is true then they will respond favorably to your message. For example, if they feel that this person always says that they will work till this deadline then they always promise that your request will be fulfilled but it will never happen. If they have a perception of that then their reaction on your message will not be favorable. For example, instead of saying we hope this recommendation will be helpful say we are glad to make this recommendation. It sounds more focused, it sounds more positive. But by saying we hope this recommendation will be useful you are implying that you do not have any control over the usefulness of the recommendation. All you can do is hope. But by saying we are glad to make this recommendation you are actually endorsing that recommendation. Another consideration in writing business messages is politeness. You need to be polite. You need to try to express facts in a kind and thoughtful manner. Use extra tact when writing and when communicating with higher ups. You will be thoughtful and tactful in communication with everyone but when you are writing to seniors or someone who is in a higher position then you will use more tact. And also be prompt in replying to communication because promptness is a form of courtesy. If you reply to someone's letter or communication then they will be aware that you are keeping an eye on what they are saying and that you care about their message. If you get a letter or business message or an email and you reply to it for a very long time then the reader gets the impression that you did not have any concern or you have no idea of their importance or basically that you don't care. So try to be prompt because that is also a form of courtesy. Also when you are composing a business message you have to remember that you are projecting your company image in your business message. When you are writing a message then you are representing your company. So the way you write it will make your company image. So you need to maybe sometimes change your style to adapt to the style of your company. If you are used to writing a business message then you will have to change your style because if you write it abruptly then your company's negative impact or negative image will go to the audience. Similarly if you always use a very casual style to communicate but your company is very conservative and it communicates in a very formal style then you will have to change your style. So let's now revise what we have done in this lesson today. First we learnt to identify the characteristics of a well-organized message. We also talked about why organization is important. Let's briefly look at what we have done in this lesson. First we learnt to identify the characteristics of a well-organized message. We also looked at the importance of organization. We also looked at the importance of organization to both the audience and the communicator. We looked at how to organize a message so that it is better for the reader and better for the reader. In this we looked at different types of messages. We looked at direct order and indirect order. We also talked about how different types of messages should follow particular orders. If there is a goodwill message, then there will be a direct order. If there is a persuasive message, then there will be an indirect order. If there is a bad news message, then there will be an indirect order. We also looked at the main idea which we have to break in subdivisions. We have to group those subdivisions in logical categories. Whatever ideas we have to keep together and why we have to keep together. Why is it important to keep the ideas together and then talk about them in a sequence. The important ideas and the less important ones should be discussed later. As I said, indirect and direct order of ideas is also used depending on the possible audience reaction. If you feel that your audience will be happy with your message, then you will use direct order. If you feel that your audience will be unhappy by reading a message or they will be sad or hurt or they will be damaged, then you will use indirect format to reduce the negative news. We also looked at composing a message using different styles and tones. We looked at some examples. This style and tone is determined according to the subject, the purpose, audience and format. Whatever style or tone you will use depends on the subject, purpose, audience or format you are using. If it is appropriate, then you will have to take care of this when you are writing your business message. Lastly, we looked at using the U article to interest the audience in your message. We talked about the U attitude. When you use the U article, what will be the reaction from it to the audience? We have seen a lot of examples in which the U article was not used. What was the difference between them and how the U article was more effective. We also saw that many times you can show the U attitude without using the U article. We also saw examples of that. I hope this lesson has been sufficient to show you how to compose your business messages and the different elements that are involved in composing a well written effective business message, whether that is of good news or bad news or direct request or persuasion. Until next time, Allah Hafiz.