我有一个暴露类型= LoadBalancer的服务,当我做一个
kubectl describe services servicename
,
我得到这个输出:
Name: ser1
Namespace: default
Labels: app=online1
Selector: app=online1
Type: LoadBalancer
IP: 10.0.0.32
External IPs: 192.168.99.100
Port: <unset> 8080/TCP
NodePort: <unset> 30545/TCP
Endpoints: 172.17.0.10:8080,172.17.0.11:8080,172.17.0.8:8080 + 1 more...
Session Affinity: None
Run Code Online (Sandbox Code Playgroud)
有人可以指导以下疑问:
1.)我无法理解<unset>
Port和NodePort中的含义.另外,它如何影响我的服务?
2.)当我想要服务时,我使用了<external-ip:NodePort>
正确的服务?那么Port的用途是什么?
我试过很多次搜索这个。静态数组通常存储在堆栈中,它们的大小在编译时确定。前任:
int main()
{
int n;
scanf("%d", &n);
int array[n];
printf("%u", sizeof(array));
return 0;
}
Run Code Online (Sandbox Code Playgroud)
数组的大小随 n 的不同值而变化。因此,这里的数组不应该存储在堆中,因为大小是在运行时确定的吗?一直对此感到困惑。请帮忙。谢谢你!
运行tensorflow代码时出现以下错误:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 579, in merge_with
new_dims.append(dim.merge_with(other[i]))
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 138, in merge_with
self.assert_is_compatible_with(other)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 111, in assert_is_compatible_with
other))
ValueError: Dimensions 5 and 4 are not compatible
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/gradients_impl.py", line 602, in gradients
in_grad.set_shape(t_in.get_shape())
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 407, in set_shape
self._shape = self._shape.merge_with(shape)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 582, in merge_with
raise ValueError("Shapes %s and %s are not compatible" % …
Run Code Online (Sandbox Code Playgroud)