How to fix Error: must either provide a name or specify --generate-name
in Helm
Created sample helm chart name as mychart and written the deployment.yaml, service.yaml, ingress.yaml with nginx service. After that running the command like $ helm install mychart
service.yaml
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
ports:
- name: main
port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
deployment.yaml
apiVersion: extensions/v1beta2
kind: Deployment
metadata:
name: nginx
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.13
ports:
containerPort: 80
ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx
annotations:
http.port: "443"
spec:
backend:
serviceName: nginx
servicePort: 80
Expected output:
.....
status: DEPLOYED
Chart.yaml
in the root of your directory. – Todaihelm install mychart
, there should be directorymychart
(under the current working directory),mychart/Chart.yaml
and the files you quote should be inmychart/templates
. Do you have it laid out like that? – Jan Hudec