-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ocserv error 2 (No such file or directory) calling stat for '/etc/ocserv/ocserv.conf #27
Comments
我知道了需要先 git clone 下来,但是我不知道 k8s内部怎么管理某个container启动的路径,所以有什么办法把这个路径加到你的这个container里面吗?/etc/ocserv |
@wyattpan @wyatt_pan |
@JuneZhao 额, 我还没有使用过 k8s, 但是如果只是简单启动一个 ocserv, 需要用到那么复杂的 k8s 吗? |
@wppurking 好的吧,主要是我还有一些其他的服务就正好一起了,用普通的docker 起好像也有些问题。 |
@JuneZhao 你的命令少了挂载ocserv目录的参数吧: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我用k8s创建这个container 下面是我的yaml文件:
apiVersion: v1
kind: Service
metadata:
name: ocservsv
labels:
app: ocservapp
spec:
type: NodePort
ports:
selector:
app: ocservapp
type: LoadBalancer
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-ocservcontainer
labels:
app: ocservapp
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: azurescea
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: my-ocserv-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: ocservapp
spec:
containers:
- name: ocservcontainer
image: wppurking/ocserv-docker
securityContext:
privileged: true
ports:
- containerPort: 443
name: ocservtcp443
- containerPort: 443
name: ocservudp443
protocol: UDP
volumeMounts:
- name: ocserv-persistent-storage
mountPath: /etc/ocserv
volumes:
- name: ocserv-persistent-storage
persistentVolumeClaim:
claimName: pvc-ocservcontainer
但是创建完成之后日志会提示这个错误:
net.ipv4.ip_forward = 1
ocserv error 2 (No such file or directory) calling stat for '/etc/ocserv/ocserv.conf'
The text was updated successfully, but these errors were encountered: