美文网首页
Kubernetes 问题集锦

Kubernetes 问题集锦

作者: 香菜香菜我是折耳根 | 来源:发表于2020-03-06 20:45 被阅读0次

1. 删除 Namespace 时卡住

#!/bin/bash

if [ -z "${1}" ] ; then
  echo -e "\nUsage: ${0} <name_of_the_namespace_to_remove_the_finalizer_from>\n"
  echo "Valid cluster names, based on your kube config:"
  kubectl config view -o jsonpath='{"Cluster name\tServer\n"}{range .clusters[*]}{.name}{"\t"}{.cluster.server}{"\n"}{end}'
  exit 1
fi

kubectl proxy --port=8901 &
PID=$!
sleep 1

echo -n 'Current context : '
kubectl config current-context
read -p "Are you sure you want to remove the finalizer from namespace ${1}? Press Ctrl+C to abort."

kubectl get namespace "${1}" -o json \
            | jq '.spec.finalizers = [ ]' \
            | curl -k \
            -H "Content-Type: application/json" \
            -X PUT --data-binary @- "http://localhost:8901/api/v1/namespaces/${1}/finalize"

kill -15 $PID

https://github.com/kubernetes/kubernetes/issues/60807

相关文章

  • Kubernetes 问题集锦

    1. 删除 Namespace 时卡住 https://github.com/kubernetes/kuberne...

  • K8S面试题

    基本的 Kubernetes 面试问题 什么是 Kubernetes? 答:kubernetes是一个开源容器管理...

  • 详解 Kubernetes Pod imagePullPolic

    详解 Kubernetes Pod imagePullPolicy 问题背景 Kubernetes 管理下的容器会...

  • IBM、谷歌等一票大佬共同研发的Knative,究竟是什么?

    Knative是什么? 要了解这个问题,你必须先了解什么是Kubernetes?以及Kubernetes最大的问题...

  • 问题集锦

    公司一 在两个子线程中利用Handler 实现通信 手写冒泡算法 Activity 四种启动模式 Activity...

  • 问题集锦

    (intermediate value)(...) is not a function https://githu...

  • 问题集锦

    1. Release apk打包问题:Lint found fatal errors while assembli...

  • 问题集锦

    一伙人凭借激情凑在一起开店容易,但是想要经营好并非易事。 第一:股东众多、管理混乱且低效。众筹模式少则几十人,多则...

  • 问题集锦

    title: 问题集锦 fastjson 使用 unable to resolve superclass of ...

  • 问题集锦

    OC、C++、Swift混编易遇到如下问题: Use of '@import' when C++ modules ...

网友评论

      本文标题:Kubernetes 问题集锦

      本文链接:https://www.haomeiwen.com/subject/eeanrhtx.html