aws-app-mesh-controller-for-k8s
aws-app-mesh-controller-for-k8s copied to clipboard
Duplicate envoy and proxinit values problems
Have tried to create duplicated (almost) resources on my EKS cluster. But after creating the second resource (which actually also was successfully implemented) getting this problem. Bellow showing my components which I tried to implement, they are the same for all three, except changing the name of resources (changed the digit +1 on names and labels).
How I reproduce it : VirtualNode
apiVersion: appmesh.k8s.aws/v1beta2
kind: VirtualNode
metadata:
name: shared-virtual-node-1
namespace: shared
spec:
podSelector:
matchLabels:
app: httpd-echo1
listeners:
- portMapping:
port: 80
protocol: http
serviceDiscovery:
dns:
hostname: httpd-echo1.test.com
VirtualRoute
apiVersion: appmesh.k8s.aws/v1beta2
kind: VirtualRouter
metadata:
namespace: shared
name: shared-virtual-router-1
spec:
listeners:
- portMapping:
port: 80
protocol: http
routes:
- name: shared-route-1
httpRoute:
match:
prefix: /
action:
weightedTargets:
- virtualNodeRef:
name: shared-virtual-node-1
weight: 1
VirtualService
apiVersion: appmesh.k8s.aws/v1beta2
kind: VirtualService
metadata:
name: shared-virtual-node-1
namespace: shared
spec:
awsName: httpd-echo1.test.com
provider:
virtualRouter:
virtualRouterRef:
name: shared-virtual-router-1
Resources of application
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpd-echo-deployment
namespace: shared
labels:
app: httpd-echo1
spec:
replicas: 2
selector:
matchLabels:
app: httpd-echo1
template:
metadata:
labels:
app: httpd-echo1
spec:
containers:
- name: httpd
image: hashicorp/http-echo
args:
- "-text=test"
ports:
- containerPort: 5678
apiVersion: v1
kind: Service
metadata:
namespace: shared
name: httpd-echo-service
labels:
app: httpd-echo1
spec:
ports:
- port: 5678
targetPort: 5678
protocol: TCP
type: NodePort
selector:
app: httpd-echo1
When I implementing them, they are working correctly and created on AWS all resources and on K8s also. The second one (just changed the name on number "2"), also everything is working fine. But when doing the same actions a third time, getting problems on the step of implementation of "Deployment" resources. Maybe I wrong on the concept of this somehow? Error from events log:
40m Warning FailedCreate replicaset/httpd-echo-deployment4-68d6c776d Error creating: Pod "httpd-echo-deployment4-68d6c776d-dqvvw" is invalid: [spec.containers[2].name: Duplicate value: "envoy", spec.initContainers[1].name: Duplicate value: "proxyinit"]