Git Product home page Git Product logo

mdblog's People

Watchers

 avatar  avatar

mdblog's Issues

Kubernetes Operator Pattern

Best Practice

Base Concept

Without help of kubebuilder

Approches

Source Code Anylsis

code-generator

ES ILM原理和实践

https://www.elastic.co/guide/en/elasticsearch/reference/7.6/overview-index-lifecycle-management.html
You can create and apply Index lifecycle management (ILM) policies to automatically manage your indices according to your performance, resiliency, and retention requirements. Index lifecycle policies can trigger actions such as:
- Rollover - Redirect an alias to begin writing to a new index when the existing index reaches a certain age, number of docs, or size.
- Shrink - Reduce the number of primary shards in an index.
- Force merge - Manually trigger a merge to reduce the number of segments in each shard of an index and free up the space used by deleted documents.
- Freeze - Make an index read-only and minimize its memory footprint.
- Delete - Permanently remove an index, including all of its data and metadata.

k8s pod ImagePullBackOff

  • Add new secret for pull
  • Add imagePullSecrets in pod manifest

first login, then create the secret

docker login <url>

cat ~/.docker/config.json

kubectl create secret generic <name> --from-file=.dockerconfigjson=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson -n <ns-name>

create secret with command line opts

kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>

Dos for Logging

https://kubesphere.io/docs/toolbox/log-query/

The logs of applications and systems can help you better understand what is happening inside your cluster and workloads. The logs are particularly useful for debugging problems and monitoring cluster activities. KubeSphere provides a powerful and easy-to-use logging system which offers users the capabilities of log collection, query and management from the perspective of tenants. The tenant-based logging system is much more useful than Kibana since different tenants can only view their own logs, leading to better security. Moreover, KubeSphere logging system filters out some redundant information so that tenants can only focus on logs that are useful to them.

ES Recovery

Recover发生的场景

Recovery automatically occurs during the following processes:

  • Node startup or failure. This type of recovery is called a local store recovery.
  • Primary shard replication.
  • Relocation of a shard to a different node in the same cluster.
  • Snapshot restoration.

Diagnose Es with Red Status

查看分片失败原因

GET _cluster/allocation/explain
{
  "index": "log-20200512",
  "shard": 4,
  "primary": true
}

尝试为失败的分片重新分配节点

POST _cluster/rerouter?retry_failed

Golang strings package

学习Golang中常用字符串操作,可以结合Python中字符串进行对比学习

ES知识点汇总

ES index templates可以设置:

  • index_patterns
  • settings
  • mappings
  • aliases

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.