Kubernetes example
TrejGun opened this issue Β· comments
kubernetes example says
β ~ kubectl logs verdaccio-deployment-64d64f5d95-z4nft -p
warn --- config file - /verdaccio/conf/config.yaml
warn --- Plugin successfully loaded: verdaccio-htpasswd
warn --- Plugin successfully loaded: verdaccio-audit
warn --- invalid address - http://0.0.0.0:tcp://10.111.233.6:4873, we expect a port (e.g. "4873"), host:port (e.g. "localhost:4873") or full url (e.g. "http://localhost:4873/")
Hi @juanpicado
what kind of info do you need?
I'm running macOS 10.14.5
β ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:45:25Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
β ~ minikube version
minikube version: v1.0.0
The reason for opening this issue, it is not clear. What's the issue? etc etc ...all I need to know to help you.
I'm trying to run code from kubernetes-example
folder but pod stucks in CrashLoopBackOff
i'm total noob in kebernetes but it looks like a missconfiguration in this part
http://0.0.0.0:tcp://10.111.233.6:4873
I have also tried to run doker version and it works, so this is definetely missconfiguration of kubernetes
Can you please take a look?
Probably some wrong value in the config file. Can you share the relevant part with us?
i did not changhe any values just run code from kubernetes-example
Ah ok, thanks for the info.
this works
deployment.yaml
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: verdaccio-deployment
spec:
replicas: 1
selector:
matchLabels:
app: verdaccio
template:
metadata:
labels:
app: verdaccio
spec:
containers:
- name: verdaccio
image: verdaccio/verdaccio
imagePullPolicy: Always
ports:
- containerPort: 4873
service.yaml
apiVersion: v1
kind: Service
metadata:
name: verdaccio-service
spec:
type: NodePort
selector:
app: verdaccio
ports:
- port: 4873
targetPort: 4873
nodePort: 30061
protocol: TCP
ingfress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: verdaccio-ingress
spec:
backend:
serviceName: verdaccio-service
servicePort: 4873
β kubernetes-example git:(master) β minikube service verdaccio-service --url
http://192.168.99.101:30061
Can make PR if you are interested
@TrejGun I'm open to PR, but I would love to know the difference. I noticed your example remove type: LoadBalancer
from service.yaml
and imagePullPolicy: Always
from deployment.yaml
. The ingress.yml
is new. So, what's the difference? (I'm also a beginner with kubernettes)
@juanpicado I told you I'm complete noob) So it appers I had kubectl
from docker installation, which is very old. After I replaced it with normal kubectl using explanation from this thread https://stackoverflow.com/questions/55417410/kubernetes-create-deployment-unexpected-schemaerror/55581050 your initial example worked
I've found the issue.
Kubernetes adds additional env vars for runnning services in same namespace when starting new pods.
So if we name our service verdaccio
, kubernetes will add VERDACCIO_PORT=tcp://<ip>:4873
to the new pod env, which overrides the dockerfile env.
My workaround is to override the VERDACCIO_PORT
again.