brave-rainbow-31093
04/13/2023, 8:09 AMbetter-wolf-9235
04/13/2023, 10:01 AM-> kubectx
I0413 15:29:59.844450 64080 versioner.go:56] Remote kubernetes server unreachable
I0413 15:30:05.131215 64088 versioner.go:56] Remote kubernetes server unreachable
how can I set my kubectl version to 1.21 or similar
ls -la /usr/local/bin/kubectl
lrwxr-xr-x 1 root admin 55 Nov 11 11:08 /usr/local/bin/kubectl -> /Applications/Docker.app/Contents/Resources/bin/kubectl
lively-knife-89419
04/13/2023, 12:03 PMbillowy-apple-60989
04/13/2023, 2:22 PMAlertmanagerConfig
for use in the Monitoring V2 App but hitting a bit of a problem, hopefully someone can come to the rescue 🙂
I have a config that look something like this:
apiVersion: <http://monitoring.coreos.com/v1alpha1|monitoring.coreos.com/v1alpha1>
kind: AlertmanagerConfig
metadata:
name: alertmanager-config
spec:
receivers:
- name: cloudops
pagerdutyConfigs:
- httpConfig: {}
routingKey:
key: routing-key
name: pagerduty-routing-key
sendResolved: true
- name: opt
slackConfigs:
- apiURL:
key: slack-webhook
name: slack-webhook
channel: '#...'
httpConfig: {}
sendResolved: true
text: '{{ template "slack.rancher.text" . }}'
- name: sws
slackConfigs:
- apiURL:
key: slack-webhook
name: slack-webhook
channel: '#...'
httpConfig: {}
sendResolved: true
text: '{{ template "slack.rancher.text" . }}'
route:
groupBy:
- job
groupInterval: 1m
groupWait: 30s
receiver: cloudops
routes:
- matchers:
- name: namespace
regex: true
value: foo|bar
receiver: sws
- matchers:
- name: namespace
value: foo-prod
receiver: opt
Which in turn results in this Routing tree:
/alertmanager $ amtool --alertmanager.url=<http://localhost:9093> config routes show
Routing tree:
.
└── default-route receiver: null
├── {namespace="cattle-monitoring-system"} continue: true receiver: cattle-monitoring-system-alertmanager-config-cloudops
│ ├── {namespace=~"^(?:foo|bar)$"} receiver: cattle-monitoring-system-alertmanager-config-sws
│ └── {namespace="foo-prod"} receiver: cattle-monitoring-system-alertmanager-config-opt
└── {alertname="Watchdog"} receiver: null
It seems the spec.route.receiver
is ignored and moved under the default-route node, and the other 2 routes becomes a child of that node which means i can't get the matching to act as expected:
/alertmanager $ amtool --alertmanager.url=<http://localhost:9093> config routes test namespace=foo-prod
null
broad-bird-4347
04/13/2023, 4:37 PMminiature-advantage-81095
04/13/2023, 7:46 PM1.25.6
and now when attempting to upgrade rancher ui from v2.6.5 to latest stable I am getting the following error.
Error: UPGRADE FAILED: execution error at (rancher/templates/validate-psp-install.yaml:4:5): The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding.
After some googling I ended up at https://github.com/rancher/rancher/issues/40331 which is closed I've attempted to --set global.cattle.psp.enabled=false
but no luck. I do not use this PSP system or whatever any ideas how I can make this work without a fresh install?miniature-advantage-81095
04/13/2023, 7:46 PMprehistoric-advantage-39331
04/13/2023, 10:53 PMbrave-rainbow-31093
04/14/2023, 5:49 AMbusy-teacher-96897
04/14/2023, 5:55 AMsalmon-hair-21488
04/14/2023, 9:59 AMnice-farmer-97811
04/14/2023, 10:30 AMbusy-flag-55906
04/14/2023, 11:48 AMbest-address-42882
04/14/2023, 3:23 PMacceptable-jordan-65878
04/14/2023, 5:08 PMchilly-translator-36463
04/14/2023, 8:54 PMchilly-translator-36463
04/14/2023, 8:56 PMchilly-translator-36463
04/14/2023, 8:56 PMchilly-translator-36463
04/14/2023, 8:58 PMchilly-translator-36463
04/14/2023, 8:59 PMchilly-translator-36463
04/14/2023, 8:59 PMchilly-translator-36463
04/14/2023, 9:00 PMminiature-advantage-81095
04/14/2023, 9:12 PM- apiGroups: [""]
resources:
- serviceaccounts/token
verbs:
- create
Also nginx ingress wasn't able to properly list endpoint slices. I had to add this to the ingress-nginx clusterrole:
- apiGroups:
- <http://discovery.k8s.io|discovery.k8s.io>
resources:
- endpointslices
verbs:
- list
- watch
- get
I tracked the definitions down to here <https://github.com/rancher/kontainer-driver-metadata/tree/dev-v2.7/rke/templates> and indeed I don't see any endpoint slices for anything ingress-nginx related
But again my cluster is a few years old now and It might just be falling apart after the hell I put it through upgrading from 1.23 to 1.25many-minister-14264
04/15/2023, 3:24 PMsquare-rose-18388
04/16/2023, 1:59 AMorange-hair-92774
04/16/2023, 2:29 PMaloof-agency-97600
04/17/2023, 12:31 AMaloof-agency-97600
04/17/2023, 1:35 AMmammoth-insurance-16703
04/17/2023, 3:03 AMwitty-translator-86250
04/17/2023, 9:50 AM