Why Every Ops Team Needs a Kubernetes Standards Playbook
This article shares practical standards for Kubernetes operations—from infrastructure choices and application packaging to CI/CD tooling—helping teams reduce complexity, improve reliability, and foster continuous learning and sharing in fast‑moving cloud environments.
Standard Tree
Kubernetes has become the industry standard and a must‑have skill for operations, yet there is no unified implementation standard, leading to countless diverse clusters and problems.
Infrastructure Standards
When selecting cloud infrastructure (example shown with Alibaba Cloud), consider the following:
ECS type: choose consistent instance types to avoid obscure issues caused by mixed shared and dedicated resources.
System version: standardize the OS (e.g., CentOS) to simplify maintenance and reduce risk.
Kernel version: use a stable kernel across all servers, as Kubernetes and Docker have specific kernel requirements.
Security group configuration: keep security groups uniform to ease management and handover.
Network segmentation: allocate separate CIDR blocks per business unit (e.g., 192.168.1.0/24 for A, 192.168.2.0/24 for B) to simplify NAT gateway configuration and traffic isolation.
Application Standards
Increase operational influence by actively participating throughout the application lifecycle and establishing clear standards.
Key aspects include:
Packaging method: standardize on a single build tool (e.g., Gradle for Java) to simplify CI templates.
Application directory layout:
- deployment directory /app
- cache directory /app/cache
- log directory /app/logs
- temp directory /app/tmpLog handling: define a uniform log format and output to the console for easy collection. 日志不规范,运维两行泪 Runtime parameters: standardize ports (e.g., 8080) and JVM options. Example JVM configuration:
-server
-XX:+UseG1GC
-XX:MaxGCPauseMillis=50
-Xms1G -Xmx1G
-XX:MetaspaceSize=128m JAVA_MAXMETA_SIZE="512m"
-XX:LargePageSizeInBytes=128m
-XX:+ParallelRefProcEnabled
-XX:+PrintAdaptiveSizePolicy
-XX:+UseFastAccessorMethods
-XX:+TieredCompilation
-XX:+ExplicitGCInvokesConcurrent
-XX:AutoBoxCacheMax=20000
-XX:+UnlockExperimentalVMOptions
-XX:+UseCGroupMemoryLimitForHeap
-XX:+PerfDisableSharedMem
-verbosegc -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/app/logs/gc.log
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/logs/oom-`date +%Y%m%d%H%M%S`.hprofArtifact Standards
Container images should follow these guidelines:
Choose a standardized base image for easier upgrades and vulnerability fixes.
Keep image layers minimal.
Run containers as non‑root users and avoid privileged mode.
Install only necessary packages.
CI/CD Standards
Select CI/CD tools based on existing usage, team composition, and familiarity; avoid frequent tool switching.
Example with Jenkins:
Leverage shared libraries to abstract repetitive code.
Maintain a unified Jenkinsfile for projects using the same language stack.
Standardize variable names and command syntax for clarity.
Implement proper permission controls for multi‑environment deployments.
Prefer a single deployment method (Helm chart or plain Deployment) to reduce complexity.
标准很重要,标准却没有标准。Continuous Accumulation
Rapid technological change requires ongoing knowledge collection and organized archiving (e.g., using Yuque) so that information can be quickly retrieved when needed.
Sharing
Sharing knowledge internally and externally should be concise and beginner‑friendly; avoid excessive jargon and focus on practical explanations.
Continuous Learning
Commit to lifelong learning—reading books across technical, parenting, and personal growth topics—to continuously expand skills and maintain upward career momentum.
Conclusion
Adopt standards first, then extend them, while consistently learning, accumulating, and sharing to cultivate habits that drive sustainable growth and reliable operations.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Efficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
