tag:blogger.com,1999:blog-54202426013182361342024-02-20T03:10:00.560-08:00megamanicsSKihttp://www.blogger.com/profile/17577999183415542726noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5420242601318236134.post-56562703089207532892023-10-03T11:25:00.008-07:002023-10-03T11:25:56.194-07:00🚀 How to Supercharge Your Business Chat API with LLMs Using AI<p></p><div style="text-align: center;">SANKHE LLC</div><span style="background-color: white; color: #050505; font-family: ArialMT, Arial, sans-serif; font-size: 15px; letter-spacing: -0.24px;"><div style="text-align: center;"><span style="letter-spacing: -0.24px;">347-443-9247</span></div></span><span style="background-color: white; color: #050505; font-family: ArialMT, Arial, sans-serif; font-size: 15px; letter-spacing: -0.24px;"><div style="text-align: center;"><span style="letter-spacing: -0.24px;">ai@sankhe.com</span></div></span><p></p><p><b style="background-color: white; color: #050505; font-family: ArialMT, Arial, sans-serif; font-size: 15px; letter-spacing: -0.24px;"><br /></b></p><h1 style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white; font-size: 18px;">Have you ever wished your business chatbot could have more natural conversations? As a consultant who has worked with many companies on implementing conversational AI, I've seen how large language models (LLMs) like GPT can take chatbots to the next level.</span></h1><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">In this post, I'll walk you through how to integrate LLMs into your existing chat API to make your bot more human-like. The benefits are huge - increased customer satisfaction, reduced support tickets, and lower costs. Let's get started!</span></p><h2 style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">🤖 The Limitations of Rules-Based Bots</span></h2><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">Many chatbots today use rules-based approaches. This means they have a set of predefined responses for certain keywords or questions.</span></p><div style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px;"><div class="MarkdownCodeBlock_codeHeader__zWt_V" style="align-items: center; border-radius: var(--pdl-sizing-radius-lg) var(--pdl-sizing-radius-lg) 0 0; display: flex; justify-content: space-between; padding: var(--pdl-spacing-xs) 0;"><div class="MarkdownCodeBlock_languageName__4_BF8" style="fill: var(--pdl-accent-on-accent) !important; padding-left: var(--pdl-spacing-lg);"><span style="background-color: white;">mermaid</span></div><button class="Button_buttonBase__Bv9Vx Button_flat__dcKQ1 MarkdownCodeBlock_copyButton__1_hA9" style="align-items: center; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 1.5em; border-style: none; border-width: initial; cursor: pointer; display: flex; fill: var(--pdl-accent-on-accent) !important; flex-direction: row; font-family: inherit; font-size: inherit; font-weight: 450; gap: 6px; justify-content: center; margin: 0px; padding: .6em var(--pdl-spacing-lg);"><svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg><span style="background-color: white;"><path d="m21.205 7.556-5.291-5.265A.995.995 0 0 0 15.209 2h-6.5a1 1 0 0 0-1 1v2.235h2V4h4.503v4.265a1 1 0 0 0 1 1H19.5v5.5h-1.209v2H20.5a1 1 0 0 0 1-1v-7.5a.998.998 0 0 0-.295-.709Zm-4.993-2.147 1.865 1.856h-1.865V5.409Z"></path><path d="m15.996 12.791-5.291-5.265a1 1 0 0 0-.705-.29H3.5a1 1 0 0 0-1 1V21a1 1 0 0 0 1 1h11.791a1 1 0 0 0 1-1v-7.5a1 1 0 0 0-.295-.709Zm-4.993-2.147 1.865 1.856h-1.865v-1.856ZM4.5 20V9.235h4.503V13.5a1 1 0 0 0 1 1h4.288V20H4.5Z"></path></span><span style="background-color: white;">Copy</span></button></div><pre class="MarkdownCodeBlock_preTag__QMZEO" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0 0 var(--pdl-sizing-radius-lg) var(--pdl-sizing-radius-lg); font-size: 14px; line-height: 1.25rem; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0.5em;"><code class="MarkdownCodeBlock_codeTag__5BV0Z" style="background-color: white; font-family: Consolas, monaco, monospace; padding: 0px; word-break: break-all;">graph TD
A[User Input] --> B{Keywords & Intent Matching}
B -->|Match| C[Send Predefined Response]
B -->|No Match| D[Default Response]
</code></pre></div><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">While rules-based bots can be useful for common queries, they fall short in natural conversation. Without the ability to understand context, they can seem robotic.</span></p><h2 style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">💡 How LLMs Enable More Human-Like Conversation</span></h2><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">LLMs like GPT overcome these limitations through sheer statistical power. With billions of parameters, they can understand nuanced language and generate highly fluent responses.</span></p><div style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px;"><div class="MarkdownCodeBlock_codeHeader__zWt_V" style="align-items: center; border-radius: var(--pdl-sizing-radius-lg) var(--pdl-sizing-radius-lg) 0 0; display: flex; justify-content: space-between; padding: var(--pdl-spacing-xs) 0;"><div class="MarkdownCodeBlock_languageName__4_BF8" style="fill: var(--pdl-accent-on-accent) !important; padding-left: var(--pdl-spacing-lg);"><span style="background-color: white;">mermaid</span></div><button class="Button_buttonBase__Bv9Vx Button_flat__dcKQ1 MarkdownCodeBlock_copyButton__1_hA9" style="align-items: center; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 1.5em; border-style: none; border-width: initial; cursor: pointer; display: flex; fill: var(--pdl-accent-on-accent) !important; flex-direction: row; font-family: inherit; font-size: inherit; font-weight: 450; gap: 6px; justify-content: center; margin: 0px; padding: .6em var(--pdl-spacing-lg);"><svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg><span style="background-color: white;"><path d="m21.205 7.556-5.291-5.265A.995.995 0 0 0 15.209 2h-6.5a1 1 0 0 0-1 1v2.235h2V4h4.503v4.265a1 1 0 0 0 1 1H19.5v5.5h-1.209v2H20.5a1 1 0 0 0 1-1v-7.5a.998.998 0 0 0-.295-.709Zm-4.993-2.147 1.865 1.856h-1.865V5.409Z"></path><path d="m15.996 12.791-5.291-5.265a1 1 0 0 0-.705-.29H3.5a1 1 0 0 0-1 1V21a1 1 0 0 0 1 1h11.791a1 1 0 0 0 1-1v-7.5a1 1 0 0 0-.295-.709Zm-4.993-2.147 1.865 1.856h-1.865v-1.856ZM4.5 20V9.235h4.503V13.5a1 1 0 0 0 1 1h4.288V20H4.5Z"></path></span><span style="background-color: white;"><br /></span></button></div><pre class="MarkdownCodeBlock_preTag__QMZEO" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0 0 var(--pdl-sizing-radius-lg) var(--pdl-sizing-radius-lg); font-size: 14px; line-height: 1.25rem; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0.5em;"><code class="MarkdownCodeBlock_codeTag__5BV0Z" style="background-color: white; font-family: Consolas, monaco, monospace; padding: 0px; word-break: break-all;">graph TD
A[User Input] --> B(LLM API)
B --> C{Understand Context}
C -->|Yes| D[Generate Response]
C -->|No| E[Fallback Option]
</code></pre></div><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">By integrating an LLM into your chatbot architecture, you enable it to handle a much wider range of conversational scenarios. The LLM understands the context and responds appropriately instead of relying on rigid rules.</span></p><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;"><br /></span></p><h2 style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">🛠 How to Integrate an LLM API</span></h2><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">Integrating an LLM API like GPT into your chatbot is straightforward from a technical perspective. Here are the key steps:</span></p><ol style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; list-style-image: initial; list-style-position: initial; margin: 0 0 var(--pdl-spacing-xl) 0; padding: 0 0 0 var(--pdl-spacing-3xl);"><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">Sign up for access to the LLM API</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">Send user input to the API</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">Parse the API response</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">Return the generated text to user</span></li></ol><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">You'll want to handle fallback logic for when the API doesn't provide a high-confidence response. But overall, it's a simple way to add powerful conversational abilities.</span></p><div style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px;"><div class="MarkdownCodeBlock_codeHeader__zWt_V" style="align-items: center; border-radius: var(--pdl-sizing-radius-lg) var(--pdl-sizing-radius-lg) 0 0; display: flex; justify-content: space-between; padding: var(--pdl-spacing-xs) 0;"><div class="MarkdownCodeBlock_languageName__4_BF8" style="fill: var(--pdl-accent-on-accent) !important; padding-left: var(--pdl-spacing-lg);"><span style="background-color: white;">python</span></div><button class="Button_buttonBase__Bv9Vx Button_flat__dcKQ1 MarkdownCodeBlock_copyButton__1_hA9" style="align-items: center; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 1.5em; border-style: none; border-width: initial; cursor: pointer; display: flex; fill: var(--pdl-accent-on-accent) !important; flex-direction: row; font-family: inherit; font-size: inherit; font-weight: 450; gap: 6px; justify-content: center; margin: 0px; padding: .6em var(--pdl-spacing-lg);"><svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg><span style="background-color: white;"><path d="m21.205 7.556-5.291-5.265A.995.995 0 0 0 15.209 2h-6.5a1 1 0 0 0-1 1v2.235h2V4h4.503v4.265a1 1 0 0 0 1 1H19.5v5.5h-1.209v2H20.5a1 1 0 0 0 1-1v-7.5a.998.998 0 0 0-.295-.709Zm-4.993-2.147 1.865 1.856h-1.865V5.409Z"></path><path d="m15.996 12.791-5.291-5.265a1 1 0 0 0-.705-.29H3.5a1 1 0 0 0-1 1V21a1 1 0 0 0 1 1h11.791a1 1 0 0 0 1-1v-7.5a1 1 0 0 0-.295-.709Zm-4.993-2.147 1.865 1.856h-1.865v-1.856ZM4.5 20V9.235h4.503V13.5a1 1 0 0 0 1 1h4.288V20H4.5Z"></path></span><span style="background-color: white;"><br /></span></button></div><pre class="MarkdownCodeBlock_preTag__QMZEO" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0 0 var(--pdl-sizing-radius-lg) var(--pdl-sizing-radius-lg); font-size: 14px; line-height: 1.25rem; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0.5em;"><code class="MarkdownCodeBlock_codeTag__5BV0Z" style="background-color: white; font-family: Consolas, monaco, monospace; padding: 0px; word-break: break-all;">user_input = get_user_input()
api_response = call_LLM_API(user_input)
if api_response.confidence > 0.8:
return api_response.text
else:
return fallback_response()
</code></pre><pre class="MarkdownCodeBlock_preTag__QMZEO" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0 0 var(--pdl-sizing-radius-lg) var(--pdl-sizing-radius-lg); font-size: 14px; line-height: 1.25rem; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0.5em;"><code class="MarkdownCodeBlock_codeTag__5BV0Z" style="background-color: white; font-family: Consolas, monaco, monospace; padding: 0px; word-break: break-all;"><br /></code></pre></div><h2 style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">📈 The Business Benefits</span></h2><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">Integrating an LLM into your chatbot can provide immense business value, including:</span></p><ul style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; list-style-image: initial; list-style-position: initial; margin: 0 0 var(--pdl-spacing-xl) 0; padding: 0 0 0 var(--pdl-spacing-3xl);"><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">🙂 <strong>Increased customer satisfaction</strong> - More natural, contextual conversations</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">📉 <strong>Lower support costs</strong> - Bots handle more complex queries</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">💰 <strong>Higher sales</strong> - Personalized product recommendations</span></li></ul><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">I've seen companies increase CSAT by over 20% and lower support tickets by 30%+ with conversational AI. The ROI is substantial.</span></p><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;"><br /></span></p><h2 style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">🚀 Time to Lift Off!</span></h2><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">I hope this post has gotten you excited about the possibilities of supercharging your chatbot with LLMs. It's easier than ever to implement using APIs like GPT-3.</span></p><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">If you're looking for help on your conversational AI journey, <strong>my team would be happy to provide strategic guidance and hands-on implementation support.</strong> Feel free to <a href="http://">book a consultation call </a>or reach out Sankhe LLC directly at </span><b style="background-color: white; color: #050505; font-family: ArialMT, Arial, sans-serif; font-size: 15px; letter-spacing: -0.24px;">347-443-9247 </b><span style="background-color: white;">to discuss your needs.</span></p><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">The future of chatbots is conversational and human-like. Let's start building the next generation for your business today!</span></p><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><br /></p><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">Let me know if you have any other questions! Here are some ways we can continue the conversation:</span></p><ol style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; list-style-image: initial; list-style-position: initial; margin: 0 0 var(--pdl-spacing-xl) 0; padding: 0 0 0 var(--pdl-spacing-3xl);"><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">What chatbot use cases are most important for your business?</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">Would you like to discuss integration architectures and options?</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">Shall we explore costs, ROI projections, and pricing models?</span></li><li style="margin: 0px; padding: 0px;"><span style="background-color: white;">Are you ready to schedule a call to kickstart your LLM chatbot project?</span></li></ol><p style="font-family: -apple-system, system-ui, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 18px; line-height: calc(1em + 0.4375rem); margin: 0px; padding: 0px;"><span style="background-color: white;">Looking forward to hearing your thoughts!</span></p>SKihttp://www.blogger.com/profile/17577999183415542726noreply@blogger.com0tag:blogger.com,1999:blog-5420242601318236134.post-72646434804057650572020-11-17T19:24:00.002-08:002020-11-19T10:19:54.769-08:00How to automate management of TLS certificates on GKE <p> If you looking for a way to manage certificates to your Kubernetes clusters here's one that I tried out.<br />You can set this up within a few minutes and not have to worry about expired certificates.</p><p><br /></p><p>Create a GKE cluster:</p><p></p><blockquote>gcloud container clusters create smartcluster --addons HttpLoadBalancing --preemptible </blockquote><p></p><p><br /></p><p>Get Credentials from the cluster</p><p></p><blockquote>gcloud container clusters get-credentials smartcluster</blockquote><p> </p><p>Create a deployment:</p><p></p><blockquote>kubectl apply -f - <<EOF<br />apiVersion: apps/v1<br />kind: Deployment<br />metadata:<br /> name: nginxsvc-deployment<br />spec:<br /> selector:<br /> matchLabels:<br /> greeting: hello<br /> department: kubernetes<br /> replicas: 1<br /> template:<br /> metadata:<br /> labels:<br /> greeting: hello<br /> department: kubernetes<br /> spec:<br /> containers:<br /> - name: hello-again<br /> image: "nginx"<br /> env:<br /> - name: "PORT"<br /> value: "80" <br />EOF<br /></blockquote><p> Create a Service: <br /></p><p></p><blockquote>kubectl apply -f - <<EOF<br />apiVersion: v1<br />kind: Service<br />metadata:<br /> name: nginxsvc<br />spec:<br /> type: NodePort<br /> selector:<br /> greeting: hello<br /> department: kubernetes<br /> ports:<br /> - protocol: TCP<br /> port: 80<br /> targetPort: 80 <br />EOF<br /></blockquote><p></p><br /> <p>Create the managed certificate for your domain name:<br /> </p><p></p><blockquote>kubectl apply -f - <<EOF<br />apiVersion: networking.gke.io/v1beta2<br />kind: ManagedCertificate<br />metadata:<br /> name: test-nginx-cert<br />spec:<br /> domains:<br /> - nginx.sankhe.com #enter your domain name here<br />EOF<br /></blockquote><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-mM8_3KsmvJs9VPN1OLX47uzz1Z_oVsNlubmxIVXA0vJLlqPcfB3rnK82IwG62NLSWdhhATlu4Xd_0SB8BqvxvzEr-WpGqZXNZgdce-akC9U4Hh53bxo2TgSY9w1deWP1G6BUuGOBx2g3/s580/Screen+Shot+2020-11-17+at+8.11.55+PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="68" data-original-width="580" height="75" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-mM8_3KsmvJs9VPN1OLX47uzz1Z_oVsNlubmxIVXA0vJLlqPcfB3rnK82IwG62NLSWdhhATlu4Xd_0SB8BqvxvzEr-WpGqZXNZgdce-akC9U4Hh53bxo2TgSY9w1deWP1G6BUuGOBx2g3/w631-h75/Screen+Shot+2020-11-17+at+8.11.55+PM.png" width="631" /></a></div> Create a loadbalancer for the ingress and attach the managed certificate.<br /><br /><p></p><blockquote>kubectl apply -f - <<EOF<br />apiVersion: networking.k8s.io/v1beta1<br />kind: Ingress<br />metadata:<br /> name: my-ingress<br /> annotations:<br /> # If the class annotation is not specified it defaults to "gce".<br /> kubernetes.io/ingress.class: "gce"<br /> networking.gke.io/managed-certificates: test-nginx-cert<br />spec:<br /> rules:<br /> - http:<br /> paths:<br /> - path: /*<br /> backend:<br /> serviceName: nginxsvc<br /> servicePort: 80<br />EOF<br /></blockquote><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0cMk_0EJLNqBpsdwTLkhZsRWFsxfRup9q6nmEWOYm_iNEHS44UlMs03t3XyTqi5jIxEogMUtC5SJnPws_aul3zTAtoHb1v9Uwh4Pu55-WxqSMSgTEq3B0LbVGU7T8Kdndr01u61CY20B4/s618/Screen+Shot+2020-11-17+at+8.13.32+PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="46" data-original-width="618" height="55" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0cMk_0EJLNqBpsdwTLkhZsRWFsxfRup9q6nmEWOYm_iNEHS44UlMs03t3XyTqi5jIxEogMUtC5SJnPws_aul3zTAtoHb1v9Uwh4Pu55-WxqSMSgTEq3B0LbVGU7T8Kdndr01u61CY20B4/w735-h55/Screen+Shot+2020-11-17+at+8.13.32+PM.png" width="735" /></a></div><blockquote><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdSoUqJoHAa4Sequp650G4dIrk5XVXjkV9mc2wQa0raHYZmZTsdvwGazaUBmZHTMspQmBnxi2T5pNg607Yrngya6f_b8VEnTjw-roiiAIbcBwQcjhrgY4Y4Y34DFMRYACYakh5Iaq6k4KE/s561/Screen+Shot+2020-11-17+at+8.14.18+PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="70" data-original-width="561" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdSoUqJoHAa4Sequp650G4dIrk5XVXjkV9mc2wQa0raHYZmZTsdvwGazaUBmZHTMspQmBnxi2T5pNg607Yrngya6f_b8VEnTjw-roiiAIbcBwQcjhrgY4Y4Y34DFMRYACYakh5Iaq6k4KE/w546-h68/Screen+Shot+2020-11-17+at+8.14.18+PM.png" width="546" /></a></div></blockquote><p> </p><p> </p><blockquote>status:<br /> certificateName: mcrt-a2730924-e05a-4e37-a969-98801086e215<br /> certificateStatus: Provisioning<br /> domainStatus:<br /> - domain: nginx.sankhe.com <br /> status: Provisioning</blockquote><p></p><p><br /></p><p><br /></p><p>It takes approximately 15-20 minutes for the status to turn into Active</p><p></p><blockquote>k get managedcertificates/nginx-cert -o yaml --watch<br />apiVersion: networking.gke.io/v1beta2<br />kind: ManagedCertificate<br />metadata:<br /> annotations:<br /> kubectl.kubernetes.io/last-applied-configuration: |<br /> {"apiVersion":"networking.gke.io/v1beta2","kind":"ManagedCertificate","metadata":{"annotations":{},"name":"nginx-cert","namespace":"default"},"spec":{"domains":["nginx.sankhe.com"]}}<br /> creationTimestamp: "2020-11-18T00:07:22Z"<br /> generation: 3<br /> name: nginx-cert<br /> namespace: default<br /> resourceVersion: "10824"<br /> selfLink: /apis/networking.gke.io/v1beta2/namespaces/default/managedcertificates/nginx-cert<br /> uid: b4380ec7-650c-4858-b74a-d1f4f874d99b<br />spec:<br /> domains:<br /> - nginx.sankhe.com<br />status:<br /> certificateName: mcrt-1b17be8f-b51e-427c-9dc1-15ea72097202<br /> certificateStatus: <span style="color: #ff00fe;"><b>Provisioning</b></span><br /> domainStatus:<br /> - domain: nginx.sankhe.com<br /> status: <span style="color: red;"><b>FailedNotVisible</b></span><br /><br /> In cases where the status shows as <span style="color: red;"><b>FailedNotVisible. </b></span>The following steps could help diagnose the problem.</blockquote><p> </p><blockquote>dig nginx.sankhe.com<br /></blockquote><blockquote><p>;; ANSWER SECTION:<br />nginx.sankhe.com. 2858 IN A <b>34.120.42.225 </b></p></blockquote><p></p><blockquote>kubectl get ingress my-ingress get -o jsonpath='{.status.loadBalancer.ingress[0].ip}'<br /><b>34.120.42.225<br /><br /></b></blockquote><p>The IP of the ingress loadbalancer should match the value in the DNS records. If it doesnt match the DNS records need to be updated. <br /></p><p></p><blockquote><div class="separator" style="clear: both; text-align: center;"><br /></div><br />apiVersion: networking.gke.io/v1beta2<br />kind: ManagedCertificate<br />metadata:<br /> annotations:<br /> kubectl.kubernetes.io/last-applied-configuration: |<br /> {"apiVersion":"networking.gke.io/v1beta2","kind":"ManagedCertificate","metadata":{"annotations":{},"name":"nginx-cert","namespace":"default"},"spec":{"domains":["nginx.sankhe.com"]}}<br /> creationTimestamp: "2020-11-18T00:07:22Z"<br /> generation: 4<br /> name: nginx-cert<br /> namespace: default<br /> resourceVersion: "27768"<br /> selfLink: /apis/networking.gke.io/v1beta2/namespaces/default/managedcertificates/nginx-cert<br /> uid: b4380ec7-650c-4858-b74a-d1f4f874d99b<br />spec:<br /> domains:<br /> - nginx.sankhe.com<br />status:<br /> certificateName: mcrt-1b17be8f-b51e-427c-9dc1-15ea72097202<br /> certificateStatus: <span style="color: #38761d;"><b>Active</b></span><br /> domainStatus:<br /> - domain: nginx.sankhe.com<br /> status: <b><span style="color: #38761d;">Active</span></b><br /> expireTime: "2021-02-15T16:31:51.000-08:00"<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ85OojAJx0d2OkmHhNNfWNAVP_pSAL6VplVtqbxOvdgkRykt3xvanQU4OvPFjEBbGEJtDC5pUc6riw4-3Ri6V2G9zz6OXVQmKJp7Zdc2iOgqBMHMbbeOrcEYYMs1IQDYSq7gC0sYdp0G5/s583/Screen+Shot+2020-11-17+at+8.15.09+PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="583" data-original-width="527" height="664" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ85OojAJx0d2OkmHhNNfWNAVP_pSAL6VplVtqbxOvdgkRykt3xvanQU4OvPFjEBbGEJtDC5pUc6riw4-3Ri6V2G9zz6OXVQmKJp7Zdc2iOgqBMHMbbeOrcEYYMs1IQDYSq7gC0sYdp0G5/w600-h664/Screen+Shot+2020-11-17+at+8.15.09+PM.png" width="600" /></a></div></blockquote><br />Test using your browser or even on the command line.<br /><br /><p></p><p></p><blockquote>curl https://nginx.sankhe.com #replace this with your domain.</blockquote><p></p><p><br /></p><p></p><br /><p></p>SKihttp://www.blogger.com/profile/17577999183415542726noreply@blogger.com0tag:blogger.com,1999:blog-5420242601318236134.post-80702333307035689382020-11-07T19:32:00.003-08:002020-11-08T17:24:29.283-08:00Top 5 reasons to choose Cloud Run<p> </p><section class="section section--body" name="3ed9"><div class="section-divider"><hr class="section-divider" /></div><div class="section-content"><div class="section-inner sectionLayout--insetColumn"><figure class="graf graf--figure" name="3aa8"><img class="graf-image" data-height="2448" data-image-id="1*QXU42VPMAQRNXsPwzF60tg.jpeg" data-is-featured="true" data-width="3264" src="https://cdn-images-1.medium.com/max/800/1*QXU42VPMAQRNXsPwzF60tg.jpeg" /><figcaption class="imageCaption">Clouds — Photo by SKi</figcaption></figure><p class="graf graf--p" name="b569"><strong class="markup--strong markup--p-strong">What’s Cloud Run?</strong></p><p class="graf graf--p" name="2fcb"><strong class="markup--strong markup--p-strong">One liner version:</strong></p><blockquote class="graf graf--blockquote graf--hasDropCapModel" name="44be"><a class="markup--anchor markup--blockquote-anchor" data-href="https://cloud.google.com/run" href="https://cloud.google.com/run" rel="noopener" target="_blank">Cloud Run</a> is a serverless compute platform on the Google Cloud Platform that enables you to run stateless containers invocable via HTTP requests.</blockquote><p class="graf graf--p" name="94e2"><strong class="markup--strong markup--p-strong">Two words version:</strong></p><p class="graf graf--p" name="35da">Serverless containers</p></div></div></section><section class="section section--body" name="50b3"><div class="section-divider"><hr class="section-divider" /></div><div class="section-content"><div class="section-inner sectionLayout--insetColumn"><h3 class="graf graf--h3" name="6acf"><strong class="markup--strong markup--h3-strong">Top Five Reasons:</strong></h3><h3 class="graf graf--h3" name="9f63"><strong class="markup--strong markup--h3-strong">1. Any language, any library, any binary</strong></h3><p class="graf graf--p" name="d5cd">Test your Docker container locally with any language along with any dependancies.</p><h3 class="graf graf--h3" name="77c4">2. Container to production in seconds</h3><p class="graf graf--p" name="6ccb">Deploy your container to production with single click.</p><pre class="graf graf--pre" name="b941"><code class="markup--code markup--pre-code">[![Run on Google Cloud](https://storage.googleapis.com/cloudrun/button.svg)](https://console.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_image=gcr.io/cloudrun/button&cloudshell_git_repo=[YOUR_HTTP_GIT_URL])</code></pre><p class="graf graf--p" name="bae7">This creates a button like the following:</p><figure class="graf graf--figure" name="9136"><img alt="Runs on Google — one click deploy button" class="graf-image" data-height="87" data-image-id="1*ZB4hIbTUCx0BUW3D5yy1Yw.gif" data-width="500" src="https://cdn-images-1.medium.com/max/800/1*ZB4hIbTUCx0BUW3D5yy1Yw.gif" /><figcaption class="imageCaption">Single Click Deploy</figcaption></figure><h3 class="graf graf--h3" name="6c2c">3. Pay‐per‐use</h3><p class="graf graf--p" name="02a6">First 2 million requests are part of the always-free Tier every month.</p><h3 class="graf graf--h3" name="c98f"><strong class="markup--strong markup--h3-strong">4. Fully Managed</strong></h3><p class="graf graf--p" name="c8ab">No infrastructure to manage: once deployed, Cloud Run manages your services so you can sleep well.</p><h3 class="graf graf--h3" name="3c64">5. Portable</h3><p class="graf graf--p" name="ae65">Built on Knative. That means you can run it anywhere Kubernetes runs even on-prem, never worry about vendor lock-in.</p></div></div></section><a href="https://track.fiverr.com/visit/?bta=172808&nci=7007" Target="_Top"><img border="0" src="https://fiverr.ck-cdn.com/tn/serve/?cid=9266381" width="216" height="36"></a>SKihttp://www.blogger.com/profile/17577999183415542726noreply@blogger.com1