Twin Sai Techie
š addicted on Linux **
š± I’m currently learning Devops , Hacking
šÆ I’m looking to collaborate on open Source projects
š I regularly write articles on https://twinsaitechie.blogspot.com/
š« How to reach me krishnansai71@gmail.com
Github profile
https://github.com/krishnansai
Youtuber Twin Sai Tech
Saturday, January 21, 2023
Argocd with rollouts examples
examples in My github https://github.com/krishnansai/argocd-rollouts.git
ArogoCd with ArgoRollouts
Rollouts.yml
# This example demonstrates a Rollout using the blue-green update strategy, which contains a manual
# gate before promoting the new stack.
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: rollout-bluegreen
spec:
replicas: 2
revisionHistoryLimit: 2
selector:
matchLabels:
app: rollout-bluegreen
template:
metadata:
labels:
app: rollout-bluegreen
spec:
containers:
- name: rollouts-demo
image: argoproj/rollouts-demo:blue
imagePullPolicy: Always
ports:
- containerPort: 8080
strategy:
blueGreen:
# activeService specifies the service to update with the new template hash at time of promotion.
# This field is mandatory for the blueGreen update strategy.
activeService: rollout-bluegreen-active
# previewService specifies the service to update with the new template hash before promotion.
# This allows the preview stack to be reachable without serving production traffic.
# This field is optional.
previewService: rollout-bluegreen-preview
# autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout
# immediately before the promotion. If omitted, the default behavior is to promote the new
# stack as soon as the ReplicaSet are completely ready/available.
# Rollouts can be resumed using: `kubectl argo rollouts promote ROLLOUT`
autoPromotionEnabled: true
---
service.yml
kind: Service
apiVersion: v1
metadata:
name: rollout-bluegreen-active
spec:
selector:
app: rollout-bluegreen
ports:
- protocol: TCP
port: 80
targetPort: 8080
port-forwording-docker
port-forwording-docker
It is a tool to run our website in a public url without any server. it is fully automated using docker give a github url as a input and run the file you see the out put in the public url.
pre-request you should install docker on in your local machine
you should change the git repo and dir or in script.sh file
after you can run thoes commands
git clone https://github.com/krishnansai/port-forwording-docker
cd port-forwording-docker/
docker build . -t port
docker run port
you recive a public url
if you have any doute pls contact krishnansai71@gmail.com
Thursday, January 19, 2023
k8s basic commands
Kubernetes (k8s) is an open-source platform for automating the deployment, scaling, and management of containerized applications. Here are some basic commands used in k8s:
kubectl get: This command lists resources such as pods, services, and deployments.
kubectl describe: This command shows detailed information about a resource.
kubectl create: This command creates a resource from a file or from stdin.
kubectl apply: This command applies changes to a resource specified in a file or stdin.
kubectl delete: This command deletes resources specified in a file or stdin.
kubectl logs: This command shows the logs of a container in a pod.
kubectl exec: This command executes a command in a container of a running pod.
kubectl expose: This command exposes a resource as a new Kubernetes service.
kubectl scale: This command sets a new size for a deployment or replication controller.
kubectl cluster-info: This command shows the details of the cluster, including the API server and kube-dns addresses.
kubectl config: This command manages kubeconfig files, which are used to configure access to kubernetes clusters.
kubectl auth: This command manages authentication, including creating and updating credentials for clusters.
These are just a few basic commands, kubectl has many more commands and options that can be used to manage and interact with k8s cluster. It's important to consult the official documentation to u
docker basic commands
docker basic commands
Docker is a popular open-source platform for developing, shipping, and running containerized applications. Here are some basic commands used in Docker:
docker run: This command runs a command in a new container.
docker start: This command starts one or more stopped containers.
docker stop: This command stops one or more running containers.
docker ps: This command lists all running containers.
docker images: This command lists all images on the host.
docker pull: This command pulls an image from a registry.
docker push: This command pushes an image to a registry.
docker logs: This command shows the logs of a container.
docker exec: This command runs a command in a running container.
docker build: This command builds an image from a Dockerfile.
docker rm: This command removes one or more containers.
docker rmi: This command removes one or more images.
docker network: This command manages networks.
docker volume: This command manages volumes.
docker system: This command performs system-wide tasks such as cleaning up resources.
All of these commands have different options and flags that can be used to customize the behavior. It's important to read the documentation and understand what each command does before using them.
Linux intermediate comments
There are many advanced Linux commands that can be used to perform various tasks. Here are a few examples:
grep: This command is used to search for specific text patterns in a file or group of files. It is often used in combination with other commands, such as find or ls, to search through a directory structure.
sed: This command is used to perform text transformations on a file or input stream. It is often used for tasks such as replacing text, deleting lines, or formatting data.
awk: This command is a powerful text processing tool that can be used to extract information from text files or input streams. It is often used for tasks such as extracting columns of data, counting occurrences of a pattern, or performing calculations on data.
tar: This command is used to create, extract, and manipulate tar archives. It is often used to compress and backup files or directories.
find: This command is used to search for files and directories. It can search based on various criteria such as the file name, size, or modification time.
awk: This command is a powerful text processing tool that can be used to extract information from text files or input streams. It is often used for tasks such as extracting columns of data, counting occurrences of a pattern, or performing calculations on data.
ps: This command is used to view information about the processes running on a Linux system. It can display a wide range of information about processes, such as the
helm k8s
helm basic commands
Helm is a package manager for Kubernetes that allows you to easily install and manage applications on a cluster. Here are some basic commands used in Helm:
helm init: This command initializes Helm on your local machine and sets up the necessary resources in the Kubernetes cluster. It should be run once before using any other Helm commands.
helm repo add: This command adds a new Helm chart repository to your local machine. This is used to download charts from different sources.
helm search: This command searches for charts in the repositories you have added to your local machine.
helm install: This command installs a chart on your Kubernetes cluster. You can specify the chart name and a release name to identify this installation.
helm list: This command lists all of the releases that have been installed on your cluster using Helm.
helm status: This command shows the current status of a release, including the resources that were created, the version of the chart, and any available updates.
helm delete: This command deletes a release and all of the resources it created.
helm upgrade: This command upgrades an existing release to a new version of the chart.
helm rollback: This command rolls back a release to a previous version.
helm template: This command generates the resource manifest files from a chart. It can be useful for debugging a chart or for creating a custom resource manifest.
github actions
GitHub Actions is a service provided by GitHub that allows you to automate software development workflows. Here are some basic commands used in GitHub Actions:
workflow: This command is used to define a workflow in a GitHub Actions configuration file (e.g. .yml file).
jobs : This command defines a set of steps that are run in parallel or sequentially. A job can be made up of multiple steps.
steps: This command defines the individual tasks that make up a job. Each step can run a shell command, a script, or use an action from the GitHub Actions Marketplace.
runs-on: This command specifies the environment in which the job should run.
name : This command specifies the name of a job or a step.
if : This command specifies a condition that must be met for a job or step to run.
env : This command sets an environment variable that can be used by subsequent steps.
with : This command sets context for an action, such as specifying a specific version of a package.
needs : This command specifies that a job depends on the completion of another job in the same workflow.
on: This command triggers a workflow when certain events occur, such as a push to a specific branch or the creation of a pull request.
Subscribe to:
Posts (Atom)
Argocd with rollouts examples
examples in My github https://github.com/krishnansai/argocd-rollouts.git ArogoCd with ArgoRollouts Rollouts.yml # This example demonst...
-
This tool is made for MANTHAN Compadition This tool is used for find the attacker in instagram in 4 module in single tool Module 1)find the...
-
docker run -p 6070:80 dorowu/ubuntu-desktop-lxde-vnc