我通过调用创建了以下持久卷
kubectl create -f nameOfTheFileContainingTheFollowingContent.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-monitoring-static-content
spec:
capacity:
storage: 100Mi
accessModes:
- ReadWriteOnce
hostPath:
path: "/some/path"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-monitoring-static-content-claim
spec:
accessModes:
- ReadWriteOnce
storageClassName: ""
resources:
requests:
storage: 100Mi
Run Code Online (Sandbox Code Playgroud)
在此之后我试图删除pvc.但这个命令卡住了.在打电话时kubectl describe pvc pv-monitoring-static-content-claim我得到以下结果
Name: pv-monitoring-static-content-claim
Namespace: default
StorageClass:
Status: Terminating (lasts 5m)
Volume: pv-monitoring-static-content
Labels: <none>
Annotations: pv.kubernetes.io/bind-completed=yes
pv.kubernetes.io/bound-by-controller=yes
Finalizers: [foregroundDeletion]
Capacity: 100Mi
Access Modes: RWO
Events: <none>
Run Code Online (Sandbox Code Playgroud)
并为 kubectl describe pv pv-monitoring-static-content
Name: pv-monitoring-static-content
Labels: <none> …Run Code Online (Sandbox Code Playgroud) 我在Windows Server 2016上有docker.Dockerfile包含一些通过chocolatey安装的构建工具.每当我尝试从提到的Dockerfile构建映像时,它都会失败.巧克力工具没有在容器中运行.
# Use the latest Windows Server Core image.
FROM microsoft/windowsservercore
ENV chocolateyUseWindowsCompression false
RUN powershell -Command \
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \
choco feature disable --name showDownloadProgress
RUN choco install visualstudio2015professional
RUN choco install qtcreator
RUN choco install curl
RUN choco install jq
RUN choco install 7zip.install
RUN choco install jfrog-cli
RUN choco install jom
Build command here.........
C:\Program Files\Docker>docker build -t test -f Dockerfile.txt .
Sending build context to Docker daemon 54.73MB
Step 1/10 : FROM microsoft/windowsservercore …Run Code Online (Sandbox Code Playgroud) 我已经编写了一个serverless.yml部署lambda的,并且在特定的API中使用了GSI。
如果我使用serverless-offline在本地运行,则可以运行,但是在部署lambda时遇到错误:
AccessDeniedException: User: arn:aws:sts::408462944160:assumed-role/telecom-integration-dev-us-east-1-lambdaRole/integration-dev-dialerStatistics
is not authorized to perform: dynamodb:Query on resource: arn:aws:dynamodb:us-east-1:408462944160:table/integration-dialer-dev/index/other_dial_status-index
Run Code Online (Sandbox Code Playgroud)
这是我创建serverless.yml的方法
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource:
- { "Fn::GetAtt": ["DialerDynamoDbTable", "Arn" ] }
dialerStatistics:
handler: integration/dialer.statistics
description: Import data on dialer.
memorySize: 256
timeout: 30
events:
- http:
path: dialer-statistics
method: get
cors: false
private: false
DialerDynamoDbTable:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: ${self:provider.environment.DELETION_POLICY}
# DeletionPolicy: Delete # Useful for recreating environment in dev …Run Code Online (Sandbox Code Playgroud) I am trying to deploy service using helm chart on kubernetes cluster. It is throwing error as
"Error: Non-absolute URLs should be in form of repo_name/path_to_chart, got: guestbook"
Here is the guestbook service that i am deploying https://github.com/phcollignon/helm/tree/master/lab5_helm_chart_version1/
provider.helm v2.14.3
provider.kubernetes v1.16
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Run Code Online (Sandbox Code Playgroud)
$ helm install guestbook
Error: failed to download "guestbook" (hint: running `helm repo …Run Code Online (Sandbox Code Playgroud) 如果replica-set-name使用如下 api,我可以获得 ReplicaSet :
GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
Run Code Online (Sandbox Code Playgroud)
但是如何根据部署获取ReplicaSet呢?
任何帮助表示赞赏。
谢谢
我已经使用 kubeadm 安装了 Kubernetes 集群。效果很好。但不小心我重新启动了主机,而主机已经启动。重启后 kubelet 没有运行。我必须做
Kubeadm 重置
和
Kubeadm 初始化
我应该如何做才能在主机重新启动后自动启动集群?