Listen to this Post
Deploying new versions of apps can be stressful, but there are many different approaches you can take. When running in Kubernetes, the standard Deployment type is rather basic. Argo Rollouts is a more complete solution. It supports advanced strategies like blue/green deployments and canary deployments, in addition to the standard rolling deployments. The custom resource type Rollout is key to using Argo Rollouts.
James Walker describes the different strategies you can use with Argo Rollouts, as well as how to install and use it. Learn more about Argo Rollouts here: medium.com
Practice Verified Codes and Commands:
1. Install Argo Rollouts:
kubectl create namespace argo-rollouts kubectl apply -n argo-rollouts -f https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yaml
2. Create a Rollout Resource:
apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: example-rollout spec: replicas: 5 strategy: canary: steps: - setWeight: 20 - pause: {} - setWeight: 40 - pause: {duration: 10m} - setWeight: 60 - pause: {duration: 10m} - setWeight: 80 - pause: {duration: 10m} template: metadata: labels: app: example-rollout spec: containers: - name: example-container image: nginx:1.19
3. Check Rollout Status:
kubectl argo rollouts get rollout example-rollout
4. Promote a Rollout:
kubectl argo rollouts promote example-rollout
5. Abort a Rollout:
kubectl argo rollouts abort example-rollout
What Undercode Say:
Argo Rollouts is a powerful tool for managing Kubernetes deployments, offering advanced strategies like blue/green and canary deployments. These strategies allow for safer and more controlled rollouts of new application versions, reducing the risk of downtime and ensuring a smoother user experience. By using the Rollout custom resource, you can define complex deployment processes that include pauses, weight adjustments, and automatic rollbacks.
In addition to the commands provided, here are some more Linux and IT-related commands that can be useful in a Kubernetes environment:
- Check Kubernetes Cluster Status:
kubectl cluster-info
List All Pods:
kubectl get pods --all-namespaces
Describe a Pod:
kubectl describe pod <pod-name> -n <namespace>
View Logs of a Pod:
kubectl logs <pod-name> -n <namespace>
Scale a Deployment:
kubectl scale deployment <deployment-name> --replicas=3 -n <namespace>
Delete a Pod:
kubectl delete pod <pod-name> -n <namespace>
Apply a Kubernetes Manifest:
kubectl apply -f <manifest-file>.yaml
Port Forward to a Pod:
kubectl port-forward <pod-name> 8080:80 -n <namespace>
Get Services:
kubectl get svc -n <namespace>
Create a Namespace:
kubectl create namespace <namespace-name>
For more detailed information on Argo Rollouts, visit the official documentation: Argo Rollouts Documentation
By mastering these commands and strategies, you can significantly improve your deployment processes, ensuring that your applications are always running smoothly and efficiently. Whether you’re using Linux, Windows, or any other operating system, these tools and techniques are essential for any IT professional working with Kubernetes.
References:
initially reported by: https://www.linkedin.com/posts/darryl-ruggles_what-is-argo-rollouts-activity-7302444773448011779-ePFc – Hackers Feeds
Extra Hub:
Undercode AI