📊 Last week, I shared a poll about using aliases, and 8% of you said you weren't aware of them. So, I'm resharing my previous post where I explained what aliases are and how I use them to save time with Kubernetes commands. You can use them in other scenarios too. Ever used aliases in Kubernetes? They're like magic shortcuts that save you a lot of time! 😎 Here's how it works: aliases let you create custom shorthand for long kubectl commands. Think of them as your secret coding language! 🤫 To set them up in Linux, open your .bashrc or .bash_profile file and add your aliases at the bottom. Then, save, exit, and restart your terminal. Voila! You're all set with your new shortcuts! 🎉 Check out my aliases below and share yours in the comments! 👇 alias k='kubectl' alias kg='kubectl get' alias kgp='kubectl get pods' alias kgpa='kubectl get pods -A' alias kdp='kubectl delete pods' 👍🔄👤 If you find this post helpful and informative, please hit the like and share buttons to spread the knowledge! #Kubernetes #DevOps #Tips #DevOpsEngineer #DevOpsTools #Alias #HelpingHands #KubernetesCluster #DevOpsTips
Shivam Agnihotri’s Post
More Relevant Posts
-
Learnt something new today. Valuable and practical way for optimizing Kubernetes workflows.
Senior DevOps Engineer @ Infilect | Top Voice 2024 | 21K+ followers | Ex- Ravity, Nokia | Helping Freshers and Professionals
Hey folks! Ever used aliases in Kubernetes? They're like magic shortcuts that save you heaps of time! 😎 Here's the scoop: aliases let you create custom shorthand for those long, tedious kubectl commands. Just think of them as your own secret coding language! 🤫 To set them up in Linux, just open your .bashrc or .bash_profile file and add your aliases at the bottom. Then, save, exit, and restart your terminal. Voila! You're all set to rock with your new shortcuts! 🎉 Check out my aliases below and let me know yours in the comments! 👇 alias k='kubectl' alias kg='kubectl get' alias kgp='kubectl get pods' alias kgpa='kubectl get pods -A' alias kdp='kubectl delete pods' 👍🔄👤 If you find this post helpful and informative, please hit the like and share buttons to spread the knowledge! #Kubernetes #DevOps #Tips #DevOpsEngineer #DevOpsTools #Alias #HelpingHands #KubernetesCluster #DevOpsTips
To view or add a comment, sign in
-
Hey folks! Ever used aliases in Kubernetes? They're like magic shortcuts that save you heaps of time! 😎 Here's the scoop: aliases let you create custom shorthand for those long, tedious kubectl commands. Just think of them as your own secret coding language! 🤫 To set them up in Linux, just open your .bashrc or .bash_profile file and add your aliases at the bottom. Then, save, exit, and restart your terminal. Voila! You're all set to rock with your new shortcuts! 🎉 Check out my aliases below and let me know yours in the comments! 👇 alias k='kubectl' alias kg='kubectl get' alias kgp='kubectl get pods' alias kgpa='kubectl get pods -A' alias kdp='kubectl delete pods' 👍🔄👤 If you find this post helpful and informative, please hit the like and share buttons to spread the knowledge! #Kubernetes #DevOps #Tips #DevOpsEngineer #DevOpsTools #Alias #HelpingHands #KubernetesCluster #DevOpsTips
To view or add a comment, sign in
-
Day 7: 𝐄𝐝𝐢𝐭𝐢𝐧𝐠 𝐅𝐢𝐥𝐞𝐬 𝐰𝐢𝐭𝐡 𝐯𝐢 𝐚𝐧𝐝 𝐧𝐚𝐧𝐨 📝 𝐄𝐝𝐢𝐭𝐢𝐧𝐠 𝐓𝐞𝐱𝐭 𝐅𝐢𝐥𝐞𝐬 𝐔𝐬𝐢𝐧𝐠 𝐓𝐞𝐫𝐦𝐢𝐧𝐚𝐥-𝐁𝐚𝐬𝐞𝐝 𝐄𝐝𝐢𝐭𝐨𝐫𝐬 📂 Today, I’m diving into two popular terminal-based text editors in Linux: vi and nano. Knowing how to edit files directly from the terminal is a crucial skill, especially when working on remote servers or configuring systems. 🛠 𝐁𝐚𝐬𝐢𝐜 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐢𝐧 𝐯𝐢: 𝒊 : Switch to insert mode to start editing. 𝑬𝒔𝒄 : Exit insert mode. :𝒘 : Save the file. :𝒒 : Quit the editor. :𝒘𝒒 : Save and exit. :𝒒! : Quit without saving. 🛠 𝐁𝐚𝐬𝐢𝐜 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐢𝐧 𝐧𝐚𝐧𝐨: 𝑪𝒕𝒓𝒍 + 𝑶 : Save the file. 𝑪𝒕𝒓𝒍 + 𝑿 : Exit nano. 𝑪𝒕𝒓𝒍 + 𝑲 : Cut text. 𝑪𝒕𝒓𝒍 + 𝑼 : Paste text. 𝑪𝒕𝒓𝒍 + 𝑾 : Search within the file. 💡 𝐂𝐡𝐨𝐨𝐬𝐢𝐧𝐠 𝐁𝐞𝐭𝐰𝐞𝐞𝐧 𝐯𝐢 𝐚𝐧𝐝 𝐧𝐚𝐧𝐨: 𝒗𝒊 : Powerful but has a steeper learning curve, ideal for advanced users. 𝒏𝒂𝒏𝒐 : Simple and user-friendly, great for beginners or quick edits. 🔗 𝐋𝐞𝐚𝐫𝐧 𝐌𝐨𝐫𝐞 Curious about these editors? Check out this vi vs. nano comparison guide to help you decide which fits your workflow! https://lnkd.in/dk3NaxUR 💬 Question of the Day: Which editor do you prefer for editing files: vi or nano, and why? Getting comfortable with terminal-based editors has been a game-changer for me! On to the next adventure! 🌟 #DevOps #CloudComputing #AWS #Docker #Kubernetes #Terraform #Jenkins #Ansible #Git #Containerization #ContainerOrchestration #InfrastructureAsCode #CICD #ContinuousIntegration #Linux #Ubuntu #RedHat #CentOS #Fedora #Debian #Azure #Shellscripting #Python #ContinuousDelivery #ConfigurationManagement #VersionControl #Monitoring #ITAutomation #Tech #Automation #Serverless #Agile #DevSecOps #Microservices #Scalability #Deployment #ReleaseManagement #Orchestration #SiteReliabilityEngineering #AutomationTools #InfrastructureAutomation #DevOpsCulture #DevOpsEngineer #DevOpsBestPractices #DevOpsCommunity #TechJourney
To view or add a comment, sign in
-
I’m happy to share that I’ve obtained a new certification: DevOps Pre-Requisite Course from KodeKloud! In this course I have learnt, Linux basics, Networking basics, Application basics, Java, Python basics, Source code management, Web server, Database basics, SSL & TLS, YAML, Virtual box & Vagrant, Deploying a 2 - Tier Application. Thanks to KodeKloud and instructor Mumshad Mannambeth for the wonderful teaching. #kodekloud #devops #consistencyiskey
To view or add a comment, sign in
-
𝐋𝐞𝐚𝐫𝐧 𝐭𝐨 𝐁𝐮𝐢𝐥𝐝 𝐚𝐧𝐝 𝐃𝐞𝐩𝐥𝐨𝐲 𝐚 𝐃𝐨𝐜𝐤𝐞𝐫 𝐈𝐦𝐚𝐠𝐞 𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗮 𝗗𝗼𝗰𝗸𝗲𝗿 𝗜𝗺𝗮𝗴𝗲: 1. Dockerfile: Create a text file with instructions to build the image. 2. Base Image: Start with a base image like Ubuntu or Alpine Linux. 3. Dependencies: Install necessary dependencies using commands like `RUN`. 4. Application Code: Copy your application code into the image. 5. Ports: Expose any necessary ports with `EXPOSE`. 6. Build: Run `docker build` command to build the image. 𝗗𝗲𝗽𝗹𝗼𝘆𝗶𝗻𝗴 𝗮 𝗗𝗼𝗰𝗸𝗲𝗿 𝗜𝗺𝗮𝗴𝗲: 1. Docker Registry: Store your built images in a Docker registry like Docker Hub. 2. Docker Compose: Define services, networks, and volumes in a `docker•compose.yml` file. 3. Deploy: Run `docker•compose up` to deploy your application. 𝗕𝗲𝘀𝘁 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝘀: • Keep images small by minimizing layers and dependencies. • Use `.dockerignore` to exclude unnecessary files. • Regularly update base images and dependencies for security patches. 𝑱𝒐𝒊𝒏 𝑶𝒖𝒓 𝑻𝒆𝒄𝒉 𝑪𝒐𝒎𝒎𝒖𝒏𝒊𝒕𝒚 -> 𝑮𝒖𝒊𝒅𝒆 𝑶𝒕𝒉𝒆𝒓’𝒔 -> 𝑾𝒊𝒏 𝑬𝒙𝒄𝒊𝒕𝒊𝒏𝒈 𝑹𝒆𝒘𝒂𝒓𝒅𝒔 -> https://lnkd.in/gj-tfEyH 𝐃𝐞𝐯𝐎𝐩𝐬 𝐅𝐑𝐄𝐄 𝐖𝐞𝐛𝐢𝐧𝐚𝐫 & 𝐑𝐞𝐬𝐨𝐮𝐫𝐜𝐞𝐬 https://lnkd.in/gXqEp66e credit by- TheAlpha.Dev #docker #devops #engineering #kubernetes
To view or add a comment, sign in
-
𝐋𝐞𝐚𝐫𝐧 𝐭𝐨 𝐁𝐮𝐢𝐥𝐝 𝐚𝐧𝐝 𝐃𝐞𝐩𝐥𝐨𝐲 𝐚 𝐃𝐨𝐜𝐤𝐞𝐫 𝐈𝐦𝐚𝐠𝐞 𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗮 𝗗𝗼𝗰𝗸𝗲𝗿 𝗜𝗺𝗮𝗴𝗲: 1. Dockerfile: Create a text file with instructions to build the image. 2. Base Image: Start with a base image like Ubuntu or Alpine Linux. 3. Dependencies: Install necessary dependencies using commands like `RUN`. 4. Application Code: Copy your application code into the image. 5. Ports: Expose any necessary ports with `EXPOSE`. 6. Build: Run `docker build` command to build the image. 𝗗𝗲𝗽𝗹𝗼𝘆𝗶𝗻𝗴 𝗮 𝗗𝗼𝗰𝗸𝗲𝗿 𝗜𝗺𝗮𝗴𝗲: 1. Docker Registry: Store your built images in a Docker registry like Docker Hub. 2. Docker Compose: Define services, networks, and volumes in a `docker•compose.yml` file. 3. Deploy: Run `docker•compose up` to deploy your application. 𝗕𝗲𝘀𝘁 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝘀: • Keep images small by minimizing layers and dependencies. • Use `.dockerignore` to exclude unnecessary files. • Regularly update base images and dependencies for security patches. Credit :TheAlpha.Dev 𝑱𝒐𝒊𝒏 𝑶𝒖𝒓 𝑻𝒆𝒄𝒉 𝑪𝒐𝒎𝒎𝒖𝒏𝒊𝒕𝒚 -> 𝑮𝒖𝒊𝒅𝒆 𝑶𝒕𝒉𝒆𝒓’𝒔 -> 𝑾𝒊𝒏 𝑬𝒙𝒄𝒊𝒕𝒊𝒏𝒈 𝑹𝒆𝒘𝒂𝒓𝒅𝒔 ->https://app.thealpha.dev/ #docker #devops #engineering #kubernetes
To view or add a comment, sign in
-
🚀 Day 11 of my #90DaysOfDevOps Challenge ! Today, I dived deep into Error Handling in Shell Scripting! 🐚 Mastering error handling is crucial for building robust scripts that can handle unexpected situations gracefully. 💻 Here’s what I covered: 🔹 Exit Status: Every command returns an exit status. Learned how to check and act on it! 🔹 if Statements: Used them to check for errors at multiple steps. 🔹 trap Command: Cleaned up temporary files even when the script exits unexpectedly. 🔹 Redirecting Errors: Redirected errors to logs for cleaner debugging. 🔹 Custom Error Messages: Created meaningful messages to give more context when things go wrong. Sample scripts and practical exercises helped me solidify these concepts. Feeling more confident about writing reliable and maintainable bash scripts now! 🚀 Check out my blog for detailed examples and a breakdown of today's tasks : https://lnkd.in/e-Bxy-Ep #DevOps #ShellScripting #Linux #ErrorHandling #Bash #LearningJourney #90DaysOfDevOps #TrainWithShubham
To view or add a comment, sign in
-
𝗪𝗵𝗮𝘁 𝗶𝘀 𝗮 𝗠𝗮𝗸𝗲𝗳𝗶𝗹𝗲? 🤔 A Makefile is a text file used to automate the compilation process of a program. It becomes especially useful in complex projects where multiple source files are compiled together. The Makefile defines the rules for compiling these files, specifying the dependencies and commands that need to be executed. 𝗞𝗲𝘆 𝗦𝗽𝗲𝗰𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻𝘀 𝗼𝗳 𝗮 𝗠𝗮𝗸𝗲𝗳𝗶𝗹𝗲 📜 𝗥𝘂𝗹𝗲𝘀: A rule specifies how a target file is generated from source files. It consists of: 𝗔 𝘁𝗮𝗿𝗴𝗲𝘁 (the file to be generated) 𝗔 𝗱𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝘆 (what the target depends on) 𝗔 𝗰𝗼𝗺𝗺𝗮𝗻𝗱 (the instructions for building the target) 𝗩𝗮𝗿𝗶𝗮𝗯𝗹𝗲𝘀: You can use variables to store values like compiler options or file lists, making your Makefile cleaner and easier to maintain. 𝗣𝗵𝗼𝗻𝘆 𝗧𝗮𝗿𝗴𝗲𝘁𝘀: These are not actual files but represent tasks like cleaning up temporary files. 𝗨𝘀𝗲 𝗖𝗮𝘀𝗲𝘀 𝗳𝗼𝗿 𝗠𝗮𝗸𝗲𝗳𝗶𝗹𝗲 💡 𝗖𝗼𝗺𝗽𝗶𝗹𝗮𝘁𝗶𝗼𝗻 𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗶𝗼𝗻: Simplifies the process of compiling large codebases. 𝗠𝗮𝗻𝗮𝗴𝗶𝗻𝗴 𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝗶𝗲𝘀: Automatically tracks changes in source files and only recompiles what is necessary. 𝗖𝗿𝗼𝘀𝘀-𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺 𝗕𝘂𝗶𝗹𝗱𝘀: Can be configured to compile code on different operating systems with minimal changes. 𝗛𝗼𝘄 𝗶𝘀 𝗮 𝗠𝗮𝗸𝗲𝗳𝗶𝗹𝗲 𝗗𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗳𝗿𝗼𝗺 𝗢𝘁𝗵𝗲𝗿 𝗙𝗶𝗹𝗲𝘀? ⚙️ 𝗖𝗼𝗻𝗳𝗶𝗴𝘂𝗿𝗮𝘁𝗶𝗼𝗻 𝗙𝗶𝗹𝗲𝘀 (𝗲.𝗴., .𝗲𝗻𝘃, .𝗰𝗼𝗻𝗳): Makefiles focus on build automation, whereas configuration files store settings for the runtime environment. 𝗦𝗰𝗿𝗶𝗽𝘁 𝗙𝗶𝗹𝗲𝘀 (𝗲.𝗴., .𝘀𝗵): Shell scripts can automate tasks but don’t inherently manage dependencies the way a Makefile does. 𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗙𝗶𝗹𝗲𝘀 (𝗲.𝗴., .𝗷𝘀𝗼𝗻 𝗳𝗼𝗿 𝗡𝗼𝗱𝗲.𝗷𝘀): While project files manage packages and dependencies, a Makefile handles the actual build process, such as compiling source code into executables. 𝗛𝗼𝘄 𝘁𝗼 𝗖𝗿𝗲𝗮𝘁𝗲 𝗮 𝗠𝗮𝗸𝗲𝗳𝗶𝗹𝗲 📄 Below is an image that explains the steps to create a basic Makefile, including how to define targets, dependencies, and commands. 💡 Once your Makefile is ready, you can easily run it by simply typing the command 𝗺𝗮𝗸𝗲 in the terminal. Feel free to share this if you find it helpful for your dev journey! 💻 #Development #Programming #Automation #Makefile #Linux #DevOps
To view or add a comment, sign in
-
Docker ✨ What You’ll Learn: Understanding Containers: The difference between containers and traditional virtualization. 📦 Getting Started with Docker: Installation and basic commands to kick off your journey. 🛠️ Creating Docker Images: How to build, manage, and optimize your images for deployment. 🖼️ Docker Compose: Simplifying multi-container applications for easy management. 🔗 Best Practices: Tips for writing efficient Dockerfiles and maintaining your containers. 📝 By mastering Docker, you’ll enhance your workflow and boost your productivity like never before! What are your favorite Docker tips or projects? Share your experiences in the comments! 💬 🎓 Want to Master Docker? Explore our tutorials on containerization, orchestration, and best practices to streamline your development workflow! 🐳 💡Docker Essentials | Free Courses 🔗https://lnkd.in/dzfaqNys 💡Net DevOps: Cisco Python, Automation, NETCONF, SDN with Docker | Free Courses 🔗https://lnkd.in/d6Mpz-CZ 💡Hands-On Docker for Java Developers | Free Courses 🔗https://lnkd.in/dRCgGcps 💡Docker on Windows 10 and Server 2016 🔗https://lnkd.in/dcr9ETrY 💡Understanding Docker in about an Hour 🔗https://lnkd.in/dXeGN_KZ 💡WSL 2, Docker, Kali Linux and Windows Terminal - Get Started | Free Courses 🔗https://lnkd.in/dvtHJP7r Happy Learning ⭐ #Free #FreeCourses #courses #programming #Docker #Docker #Containerization #DevOps #WebDevelopment Credit goes to Mayank Ahuja
To view or add a comment, sign in
-
How I reduced the size of my very first published docker image by 40% - A lesson in dockerizing shell scripts #linux #shell #git #docker #dockerfile #containerimage #imagesize https://lnkd.in/eGgmV93m
How I reduced the size of my very first published docker image by 40% - A lesson in dockerizing shell scripts
bhupesh.me
To view or add a comment, sign in