{"id":2322,"date":"2025-05-03T03:00:25","date_gmt":"2025-05-03T00:00:25","guid":{"rendered":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/"},"modified":"2025-05-03T03:00:25","modified_gmt":"2025-05-03T00:00:25","slug":"automating-kubernetes-deployment-with-bash-scripts","status":"publish","type":"post","link":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/","title":{"rendered":"Automating Kubernetes Deployment with Bash Scripts"},"content":{"rendered":"<p><br \/>\n<\/p>\n<p>Kubernetes has become the go-to platform for managing containerized applications, providing a powerful framework for automating the deployment, scaling, and operations of application containers across clusters. While Kubernetes offers robust features, automating deployment can still be a cumbersome task without the right tools. <\/p>\n<p><\/p>\n<p>In this article, we\u2019ll explore how to use Bash scripts to streamline your Kubernetes deployment processes, ensuring efficiency and consistency. This guide is ideal for developers and DevOps engineers looking to enhance their Kubernetes workflows.<\/p>\n<p><\/p>\n<h2>Why Use Bash Scripts for Kubernetes Deployment?<\/h2>\n<p><\/p>\n<p>Bash scripting can provide several advantages in the context of Kubernetes:<\/p>\n<p><\/p>\n<ol><\/p>\n<li><strong>Automation<\/strong>: Automate repetitive tasks such as deploying applications, updating configurations, and scaling services.<\/li>\n<p><\/p>\n<li><strong>Consistency<\/strong>: Ensure that deployments are performed uniformly, minimizing the risk of human error.<\/li>\n<p><\/p>\n<li><strong>Customization<\/strong>: Tailor your deployment processes to meet the unique needs of your application and infrastructure.<\/li>\n<p>\n<\/ol>\n<p><\/p>\n<h2>Prerequisites<\/h2>\n<p><\/p>\n<p>Before diving into scripting, ensure you have the following:<\/p>\n<p><\/p>\n<ul><\/p>\n<li>A Kubernetes cluster up and running (e.g., on Google Kubernetes Engine, Amazon EKS, or a local setup like Minikube).<\/li>\n<p><\/p>\n<li><code>kubectl<\/code> installed and configured for your cluster.<\/li>\n<p><\/p>\n<li>Basic knowledge of Bash scripting and Kubernetes concepts.<\/li>\n<p>\n<\/ul>\n<p><\/p>\n<h2>Basic Structure of a Bash Script for Kubernetes Deployment<\/h2>\n<p><\/p>\n<p>Let\u2019s outline a simple structure for a Bash script that automates the deployment of a Kubernetes application.<\/p>\n<p><\/p>\n<h3>Sample Script<\/h3>\n<p><\/p>\n<p>Here\u2019s a basic example of a Bash script that deploys an application:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash<br \/>\n<br \/>\n# Exit on error<br \/>\nset -e<br \/>\n<br \/>\n# Variables<br \/>\nNAMESPACE=\"my-app\"<br \/>\nDEPLOYMENT_NAME=\"my-deployment\"<br \/>\nIMAGE=\"nginx:latest\"<br \/>\nREPLICAS=3<br \/>\n<br \/>\n# Create Namespace<br \/>\nkubectl create namespace $NAMESPACE || echo \"Namespace $NAMESPACE already exists.\"<br \/>\n<br \/>\n# Create Deployment<br \/>\nkubectl create deployment $DEPLOYMENT_NAME --image=$IMAGE -n $NAMESPACE<br \/>\n<br \/>\n# Scale the Deployment<br \/>\nkubectl scale deployment $DEPLOYMENT_NAME --replicas=$REPLICAS -n $NAMESPACE<br \/>\n<br \/>\n# Expose the Deployment via a Service<br \/>\nkubectl expose deployment $DEPLOYMENT_NAME --type=LoadBalancer --port=80 -n $NAMESPACE<br \/>\n<br \/>\necho \"Deployment $DEPLOYMENT_NAME created in namespace $NAMESPACE with $REPLICAS replicas.\"<\/code><\/pre>\n<p><\/p>\n<h3>Explanation of the Script<\/h3>\n<p><\/p>\n<ol><\/p>\n<li><strong>Shebang<\/strong>: The <code>#!\/bin\/bash<\/code> line indicates that the script should be run in the Bash shell.<\/li>\n<p><\/p>\n<li><strong>Error Handling<\/strong>: <code>set -e<\/code> makes the script exit immediately if any command fails.<\/li>\n<p><\/p>\n<li><strong>Variables<\/strong>: Define variables for easy adjustments. Update these values according to your application needs.<\/li>\n<p><\/p>\n<li><strong>Namespace Creation<\/strong>: The script attempts to create a designated namespace. If it already exists, a message is printed.<\/li>\n<p><\/p>\n<li><strong>Deployment Creation<\/strong>: Using <code>kubectl create deployment<\/code>, the script sets up a new deployment with the specified image.<\/li>\n<p><\/p>\n<li><strong>Scaling<\/strong>: Using <code>kubectl scale<\/code>, we ensure the specified number of replicas are running.<\/li>\n<p><\/p>\n<li><strong>Service Creation<\/strong>: Exposes the deployment, making it accessible from outside the cluster.<\/li>\n<p>\n<\/ol>\n<p><\/p>\n<h2>Enhancing the Script<\/h2>\n<p><\/p>\n<h3>1. Adding Environment-Specific Configurations<\/h3>\n<p><\/p>\n<p>You can enhance your script to handle multiple environments (development, staging, production) by using command-line arguments:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">ENVIRONMENT=$1<br \/>\nNAMESPACE=\"$ENVIRONMENT-my-app\"<\/code><\/pre>\n<p><\/p>\n<h3>2. Monitoring Status<\/h3>\n<p><\/p>\n<p>To ensure the deployment was successful, you can add checks for the deployment status:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">kubectl rollout status deployment\/$DEPLOYMENT_NAME -n $NAMESPACE<\/code><\/pre>\n<p><\/p>\n<h3>3. Rolling Back<\/h3>\n<p><\/p>\n<p>In case of an issue, you may want to add a rollback feature:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">kubectl rollout undo deployment\/$DEPLOYMENT_NAME -n $NAMESPACE<\/code><\/pre>\n<p><\/p>\n<h2>Best Practices<\/h2>\n<p><\/p>\n<ol><\/p>\n<li><strong>Version Control<\/strong>: Keep your scripts in a version-controlled repository (e.g., Git) to track changes.<\/li>\n<p><\/p>\n<li><strong>Parameterize Variables<\/strong>: Using environment variables or configuration files can make your scripts more flexible.<\/li>\n<p><\/p>\n<li><strong>Error Handling<\/strong>: Add more robust error handling and logging to capture failures effectively.<\/li>\n<p><\/p>\n<li><strong>Test Locally<\/strong>: Always test your scripts in a development environment before deploying to production.<\/li>\n<p>\n<\/ol>\n<p><\/p>\n<h2>Conclusion<\/h2>\n<p><\/p>\n<p>Automating Kubernetes deployments with Bash scripts can significantly optimize your workflow, reduce errors, and ensure consistent deployments. By tailoring the example scripts provided and enhancing them with best practices for your specific use case, you can harness the full power of Kubernetes while simplifying your deployment processes.<\/p>\n<p><\/p>\n<p>At WafaTech, we believe in leveraging the right tools to facilitate seamless operations in software development. Automating deployment workflows not only saves time but also allows teams to focus on building better applications. Start scripting and take your Kubernetes management to the next level!<\/p>\n<p><\/p>\n<h3>About the Author<\/h3>\n<p><\/p>\n<p>[Your Name] is a seasoned DevOps engineer with a passion for cloud technologies and automation. With years of experience managing Kubernetes environments, [he\/she\/they] thrives on sharing insights on best practices and innovative solutions in the tech space. <\/p>\n<p><\/p>\n<hr \/>\n<p><\/p>\n<p>Feel free to modify any sections to suit your style or focus areas!<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes has become the go-to platform for managing containerized applications, providing a powerful framework for automating the deployment, scaling, and operations of application containers across clusters. While Kubernetes offers robust features, automating deployment can still be a cumbersome task without the right tools. In this article, we\u2019ll explore how to use Bash scripts to streamline [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2323,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[213],"tags":[386,1366,232,217,1159],"class_list":["post-2322","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","tag-automating","tag-bash","tag-deployment","tag-kubernetes","tag-scripts","et-has-post-format-content","et_post_format-et-post-format-standard"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.5 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Automating Kubernetes Deployment with Bash Scripts - WafaTech Blogs<\/title>\n<meta name=\"description\" content=\"Automating Kubernetes Deployment with Bash Scripts %\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automating Kubernetes Deployment with Bash Scripts\" \/>\n<meta property=\"og:description\" content=\"Automating Kubernetes Deployment with Bash Scripts %\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/\" \/>\n<meta property=\"og:site_name\" content=\"WafaTech Blogs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/WafaTech\/61560546351289\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-03T00:00:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2221\" \/>\n\t<meta property=\"og:image:height\" content=\"482\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"WafaTech SA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wafatech_sa\" \/>\n<meta name=\"twitter:site\" content=\"@wafatech_sa\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"WafaTech SA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/\"},\"author\":{\"name\":\"WafaTech SA\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/person\\\/1a5761fc0feb63ab59d295d7c2648f06\"},\"headline\":\"Automating Kubernetes Deployment with Bash Scripts\",\"datePublished\":\"2025-05-03T00:00:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/\"},\"wordCount\":588,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png\",\"keywords\":[\"Automating\",\"Bash\",\"Deployment\",\"Kubernetes\",\"Scripts\"],\"articleSection\":[\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/\",\"name\":\"Automating Kubernetes Deployment with Bash Scripts - WafaTech Blogs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png\",\"datePublished\":\"2025-05-03T00:00:25+00:00\",\"description\":\"Automating Kubernetes Deployment with Bash Scripts %\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png\",\"contentUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png\",\"width\":1024,\"height\":1024,\"caption\":\"Bash Scripts for Kubernetes\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/devops\\\/kubernetes\\\/automating-kubernetes-deployment-with-bash-scripts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automating Kubernetes Deployment with Bash Scripts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/\",\"name\":\"WafaTech Blogs\",\"description\":\"Smart Technologies\",\"publisher\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#organization\"},\"alternateName\":\"WafaTech\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#organization\",\"name\":\"WafaTech Blogs\",\"alternateName\":\"WafaTech\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/logo_big.webp\",\"contentUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/logo_big.webp\",\"width\":2221,\"height\":482,\"caption\":\"WafaTech Blogs\"},\"image\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/people\\\/WafaTech\\\/61560546351289\\\/\",\"https:\\\/\\\/x.com\\\/wafatech_sa\",\"https:\\\/\\\/www.youtube.com\\\/@wafatech-sa\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wafatech\\\/\"],\"description\":\"WafaTech, a leading Saudi IT services provider, specializes in cloud solutions, connectivity, and ICT services. Offering secure cloud infrastructure, high-speed internet, and ICT solutions like hosting, backup, and disaster recovery, WafaTech operates a Tier 3 data center at KAUST with ISO certifications. Regulated by CST, the company is committed to innovation, security, and customer satisfaction, empowering businesses in the digital age.\",\"email\":\"sales@wafatech.sa\",\"legalName\":\"Al-Wafa Al-Dhakia For Information Technology LLC\",\"foundingDate\":\"2013-01-08\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/person\\\/1a5761fc0feb63ab59d295d7c2648f06\",\"name\":\"WafaTech SA\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g\",\"caption\":\"WafaTech SA\"},\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/author\\\/omer-yaseen\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Automating Kubernetes Deployment with Bash Scripts - WafaTech Blogs","description":"Automating Kubernetes Deployment with Bash Scripts %","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/","og_locale":"en_US","og_type":"article","og_title":"Automating Kubernetes Deployment with Bash Scripts","og_description":"Automating Kubernetes Deployment with Bash Scripts %","og_url":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/","og_site_name":"WafaTech Blogs","article_publisher":"https:\/\/www.facebook.com\/people\/WafaTech\/61560546351289\/","article_published_time":"2025-05-03T00:00:25+00:00","og_image":[{"width":2221,"height":482,"url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp","type":"image\/webp"}],"author":"WafaTech SA","twitter_card":"summary_large_image","twitter_creator":"@wafatech_sa","twitter_site":"@wafatech_sa","twitter_misc":{"Written by":"WafaTech SA","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#article","isPartOf":{"@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/"},"author":{"name":"WafaTech SA","@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/person\/1a5761fc0feb63ab59d295d7c2648f06"},"headline":"Automating Kubernetes Deployment with Bash Scripts","datePublished":"2025-05-03T00:00:25+00:00","mainEntityOfPage":{"@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/"},"wordCount":588,"commentCount":0,"publisher":{"@id":"https:\/\/wafatech.sa\/blog\/#organization"},"image":{"@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/05\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png","keywords":["Automating","Bash","Deployment","Kubernetes","Scripts"],"articleSection":["Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/","url":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/","name":"Automating Kubernetes Deployment with Bash Scripts - WafaTech Blogs","isPartOf":{"@id":"https:\/\/wafatech.sa\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#primaryimage"},"image":{"@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/05\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png","datePublished":"2025-05-03T00:00:25+00:00","description":"Automating Kubernetes Deployment with Bash Scripts %","breadcrumb":{"@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#primaryimage","url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/05\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png","contentUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/05\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png","width":1024,"height":1024,"caption":"Bash Scripts for Kubernetes"},{"@type":"BreadcrumbList","@id":"https:\/\/wafatech.sa\/blog\/devops\/kubernetes\/automating-kubernetes-deployment-with-bash-scripts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wafatech.sa\/blog\/"},{"@type":"ListItem","position":2,"name":"Automating Kubernetes Deployment with Bash Scripts"}]},{"@type":"WebSite","@id":"https:\/\/wafatech.sa\/blog\/#website","url":"https:\/\/wafatech.sa\/blog\/","name":"WafaTech Blogs","description":"Smart Technologies","publisher":{"@id":"https:\/\/wafatech.sa\/blog\/#organization"},"alternateName":"WafaTech","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wafatech.sa\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wafatech.sa\/blog\/#organization","name":"WafaTech Blogs","alternateName":"WafaTech","url":"https:\/\/wafatech.sa\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp","contentUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp","width":2221,"height":482,"caption":"WafaTech Blogs"},"image":{"@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/WafaTech\/61560546351289\/","https:\/\/x.com\/wafatech_sa","https:\/\/www.youtube.com\/@wafatech-sa","https:\/\/www.linkedin.com\/company\/wafatech\/"],"description":"WafaTech, a leading Saudi IT services provider, specializes in cloud solutions, connectivity, and ICT services. Offering secure cloud infrastructure, high-speed internet, and ICT solutions like hosting, backup, and disaster recovery, WafaTech operates a Tier 3 data center at KAUST with ISO certifications. Regulated by CST, the company is committed to innovation, security, and customer satisfaction, empowering businesses in the digital age.","email":"sales@wafatech.sa","legalName":"Al-Wafa Al-Dhakia For Information Technology LLC","foundingDate":"2013-01-08","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/person\/1a5761fc0feb63ab59d295d7c2648f06","name":"WafaTech SA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g","caption":"WafaTech SA"},"url":"https:\/\/wafatech.sa\/blog\/author\/omer-yaseen\/"}]}},"jetpack_featured_media_url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/05\/Automating-Kubernetes-Deployment-with-Bash-Scripts.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/posts\/2322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/comments?post=2322"}],"version-history":[{"count":0,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/posts\/2322\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/media\/2323"}],"wp:attachment":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/media?parent=2322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/categories?post=2322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/tags?post=2322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}