کانال انجمن کلاد و دوآپس تبریز – Telegram
کانال انجمن کلاد و دوآپس تبریز
261 subscribers
116 photos
5 videos
57 files
550 links
کانال انجمن کلاد، دوآپس و مهندسی اتکاپذیری سیستم تبریز، نشر اطلاعیه رویداد ها و همایش های حوزه کلاد و دوآپس تبریز
لینک گروه

https://news.1rj.ru/str/devops_tabriz_group

admin
@arsalanses
Download Telegram
kubectl cordon
Mark node as unschedulable.

kubectl drain
You can use kubectl drain to safely evict all of your pods from a node before you perform maintenance on the node (e.g. kernel upgrade, hardware maintenance, etc.). Safe evictions allow the pod's containers to gracefully terminate and will respect the PodDisruptionBudgets you have specified.

Affinity and anti-affinity
Node affinity is conceptually similar to nodeSelector, allowing you to constrain which nodes your Pod can be scheduled on based on node labels.

Taints and Tolerations
Tolerations are applied to pods. Tolerations allow the scheduler to schedule pods with matching taints. Tolerations allow scheduling but don't guarantee scheduling: the scheduler also evaluates other parameters as part of its function.

emptyDir and hostPath
For a Pod that defines an emptyDir volume, the volume is created when the Pod is assigned to a node. As the name says, the emptyDir volume is initially empty.
A hostPath volume mounts a file or directory from the host node's filesystem into your Pod. This is not something that most Pods will need, but it offers a powerful escape hatch for some applications.
Static Pods
Static Pods are managed directly by the kubelet daemon on a specific node, without the API server observing them. Unlike Pods that are managed by the control plane (for example, a Deployment); instead, the kubelet watches each static Pod (and restarts it if it fails).
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
swaks -f from-mail-address -t to-mail-address -s smtp-server:port -tls --au username --ap password --h-Subject: "Hello" --body 'Test email!'
Forwarded from Arsalan Se
https://www.restack.io/docs/nextjs-knowledge-nextjs-dockerfile-guide

FROM node:18-alpine

# Set the working directory in the container
WORKDIR /app

# Copy the package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of your app's source code
COPY . .

# Build your Next.js app
RUN npm run build

# Expose port 3000 to the Docker daemon so it can communicate
EXPOSE 3000

# Run the Next.js start noscript
CMD ["npm", "start"]
A One-Liner sed Command to Format SSH Config File
sed -i -e '/^\s*#/!{/^\s*Host /!s/^\s*/\t/}' \
-e '/^\s*Host /s/^\s*//' \
~/.ssh/config
no data just schema with --no-data
mysqldump -u root -p'password' --no-data --single-transaction --opt --skip-lock-tables dbname > dbnameschema.sql