This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mount folder /var/log from node | |
extraVolumes: | |
- name: node-logs | |
hostPath: | |
path: /var/log | |
extraVolumeMounts: | |
- name: node-logs | |
mountPath: /var/log/host | |
readOnly: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set fsGroup to allow syslog file reading | |
podSecurityContext: | |
fsGroup: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Scrape config to read syslog file from node | |
config: | |
snippets: | |
extraScrapeConfigs: | | |
# Add an additional scrape config for syslog | |
- job_name: node-syslog | |
static_configs: | |
- targets: | |
- localhost | |
labels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow environment variables usage | |
extraArgs: | |
- -config.expand-env=true | |
# Scrape config to read syslog file from node | |
config: | |
snippets: | |
extraScrapeConfigs: | | |
# Add an additional scrape config for syslog | |
- job_name: node-syslog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Kube State Metrics to get VPA metrics | |
# Old vs New metrics: | |
# - kube_verticalpodautoscaler_labels -> kube_customresource_verticalpodautoscaler_labels | |
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_target | |
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound | |
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound | |
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget | |
# Resources: | |
# - https://github.com/kubernetes/kube-state-metrics/blob/main/docs/customresourcestate-me |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eu | |
# This script change the rancher manager URL (same rancher server) for downstream clusters. | |
# You need to access to the downstream cluster outside of rancher manager server, as you need to stop the cattle-agent deployment. | |
RANCHER_URL=https://rancher.mycompany.com | |
context=$(kubectl config current-context | cut -d'@' -f 2) # My context name is user@cluster | |
mkdir -p $context | |
secretName=$(kubectl get deploy cattle-cluster-agent -n cattle-system -o jsonpath="{.spec.template.spec.volumes[0].secret.secretName}") |
OlderNewer