名称空间“ istio-system”中没有Istio pod

时间:2020-06-14 11:32:55

标签: istio

我已经安装了istioctl / 1.4.8,istioctl无法使用命令(istioctl版本-c平台)与我的集群通信

from sys import argv
import csv
from itertools import groupby
#first csv cma 2nd txt
# fread from CSV file first thing in a row is name then the number of strs
# fread from dna seq and read it into a memory
#find how many times each str censequetivel
# if number of strs == with a persons print the person

checkstr = [] #global array that tells us what str to read
def readtxt(csvfile,seq):
    with open(f'{csvfile}','r') as p:#finding which str to read from header line of the csv
        header = csv.reader(p) # Header contains which strs to look for
        for row in header:
            checkstr = row[1:]
            break
    with open(f'{seq}','r') as f:#searching the text for strs
        s = f.read()
        for c in checkstr:
            groups = groupby(s.split(c))
            try:
                return [sum(1 for _ in group)+1 for label, group in groups if label==''][0]
            except IndexError:
                return 0



def readcsv(n):
    with open(f'{n}','r') as f:
        readed = csv.DictReader(f)
        for row in readed:
            return row



def main():
    counter = 0
    if len(argv) != 3:
        print("Please start program with cmd arguments.")
        readtxt(argv[1], argv[2])#for fulling the checkstr
        for i in range(0,len(checkstr)): #Do this as much as the number of special strings
            for j in checkstr: #For each special string in the list
                if readtxt(argv[1], argv[2]) == readcsv(argv[1])[f'{checkstr[j]}']: #If dictionary value that returns for that spesific str is matches to the spesific str 
                    counter += 1
        if counter == len(checkstr): # if all spesific strs matches, then we found our person!
            print(readcsv(argv[1])['name'])
        #readtxt(argv[1], argv[2])
        #readcsv(argv[1])

main()

istio在命名空间中运行:istio-platform

这里可能是什么问题,有任何提示吗?

1 个答案:

答案 0 :(得分:2)

如果Istio名称空间不在istio-system中,则必须提供它:

istioctl version -i istio-platform

cf。 https://istio.io/latest/docs/reference/commands/istioctl/