1.
function abc(){
alert("named function");
}
Run Code Online (Sandbox Code Playgroud)
V/S
2.
function(){
alert("Un-Named function");
}
Run Code Online (Sandbox Code Playgroud)
请从初学者的角度来解释一下.
我是 Kubernetes 的新手,并且遇到了一些错误。我想在我的本地系统(mac)上创建 Kubernetes 集群。
我的部署.yaml --
apiVersion: apps/v1
kind: Deployment
metadata:
name: sv-premier
spec:
selector:
matchLabels:
app: sv-premier
template:
metadata:
labels:
app: sv-premier
spec:
volumes:
- name: google-cloud-key
secret:
secretName: gcp-key
containers:
- name: sv-premier
image: gcr.io/proto/premiercore1:latest
imagePullPolicy: Always
command: ["/bin/sh"]
args: ["-c", "while true; do echo Done Deploying sv-premier; sleep 3600;done"]
volumeMounts:
- name: google-cloud-key
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
ports:
- containerPort: 8080
imagePullSecrets:
- name: imagepullsecretkey
Run Code Online (Sandbox Code Playgroud)
我创建了部署 - kubectl apply -f deployment.yaml
kubectl …
我的图像托管在 GCR 上。我想在我的本地系统(mac)上创建 Kubernetes 集群。
我遵循的步骤:
Run Code Online (Sandbox Code Playgroud)apiVersion: apps/v1 kind: Deployment metadata: name: sv-premier spec: selector: matchLabels: app: sv-premier template: metadata: labels: app: sv-premier spec: volumes: - name: google-cloud-key secret: secretName: gcp-key containers: - name: sv-premier image: gcr.io/proto/premiercore1:latest imagePullPolicy: Always command: ["echo", "Done deploying sv-premier"] volumeMounts: - name: google-cloud-key mountPath: /var/secrets/google env: - name: GOOGLE_APPLICATION_CREDENTIALS value: /var/secrets/google/key.json ports: - containerPort: 8080 imagePullSecrets: - name: imagepullsecretkey
当我执行命令 - kubectl apply -f deployment.yaml …
我在虚拟机(redhat)上托管Jenkins.我能够在其上设置jenkins系统并能够访问jenkins.但是在创建任何构建作业时管理jenkins页面,当我给我的git存储库链接时,我收到此错误 -
Failed to connect to repository : Command "git ls-remote -h ssh://git.aaa.aaaa.corp:XXXXX/BSA/myProject.git HEAD" returned status code 128:
stdout:
stderr: Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
我试图遵循许多与SSH密钥相关的解决方案,但没有任何帮助.
PL帮助.