get name and image and startTime
kubectl get pods -Ao jsonpath='{range .items[*]}{@.metadata.name}{" "}{@..spec..containers[*].image}{" "}{@.status.phase}{" "}{@.status.startTime}{"\n"}{end}'
edited 10/2022 with ..
and A
suggestions
map $http_origin $allow_origin { | |
default "$http_origin"; | |
} | |
map $request_method $cors_method { | |
default "allowed"; | |
"OPTIONS" "preflight"; | |
} | |
map $cors_method $cors_max_age { |
docker logs nginx 2>&1 | grep "127." | |
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
--- | |
- hosts: | |
- all | |
become: true | |
tasks: | |
- name: Update apt cache | |
apt: update_cache=yes | |
- name: Upgrade packages | |
apt: upgrade=dist |
# How to monitor a secure external etcd service with Prometheus Operator | |
This guide will help you monitor an external etcd cluster. When the etcd is not hosted inside Kubernetes. | |
This is often the case with the Kubernetes setup. This has been tested with kube-aws but same principals will apply to other tools. | |
# Step 1 - Make the etcd certificates available to Prometheus pod | |
Prometheus Operator (and Prometheus) allow us to specify a tlsConfig. This is required as most likely your etcd metrics end points is secure. | |
## a - Create the secrets in the namespace | |
Prometheus Operator allows us to mount secrets in the pod. By loading the secrets as files, they can be made available inside the Prometheus pod. |
get name and image and startTime
kubectl get pods -Ao jsonpath='{range .items[*]}{@.metadata.name}{" "}{@..spec..containers[*].image}{" "}{@.status.phase}{" "}{@.status.startTime}{"\n"}{end}'
edited 10/2022 with ..
and A
suggestions
原文:中生代技术
经过数年蛰伏,DevOps成为了业界焦点,不过如何实现DevOps,依然路漫漫,本期文章转载自数人云组织的DevOps系列分享实录,了解并学习Google的DevOps实践
SRE(Site Reliability Engineering)是最早由Google提出,又经由Google发展完善的一个崭新运维理念。如今SRE已成为一个涵盖运维理念、思路、组织架构和具体实践的完整体系。数人云推出SRE系列教程,由SRE经验丰富的技术大牛们为大家分享运维一线的独家干货,揭示SRE背后的秘密。
数人云邀请了前Google SRE、《SRE:Google运维解密》的译者孙宇聪与大家进行了线上分享。本文讲述了SRE的基本概念和核心原理。与孙老师本人一样风趣幽默的文章,小数希望大家阅读愉快:)
PS:文末线下活动有孙老师翻译著作书籍赠送
--- | |
- name: Install docker | |
gather_facts: No | |
hosts: default | |
tasks: | |
- name: Install yum utils | |
yum: | |
name: yum-utils | |
state: latest |
package main | |
import ( | |
"fmt" | |
"os" | |
"runtime" | |
) | |
func userHomeDir() string { | |
if runtime.GOOS == "windows" { |
var myFlagType string | |
func init() { | |
const ( | |
flagValue = "default value is foo" | |
flagUsage = "this is my flag explanation" | |
) | |
flag.StringVar(&myFlagType, "foo", flagValue, flagUsage) | |
flag.StringVar(&myFlagType, "f", flagValue, flagUsage+" (shorthand)") | |
flag.Parse() |